Merge branch 'master' into bulk-edit-tags

This commit is contained in:
d-buchmann 2025-10-07 09:07:30 +02:00 committed by GitHub
commit 7df3e8e634
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
421 changed files with 39491 additions and 16789 deletions

View file

@ -51,8 +51,7 @@ class PartsTableActionHandlerTest extends WebTestCase
foreach ($formats as $format) {
$action = "export_{$format}";
$result = $this->service->handleAction($action, $selected_parts, '1', '/test');
$result = $this->service->handleAction($action, $selected_parts, '1', '/test');
$this->assertInstanceOf(RedirectResponse::class, $result);
$this->assertStringContainsString('parts/export', $result->getTargetUrl());
$this->assertStringContainsString("format={$format}", $result->getTargetUrl());

View file

@ -22,6 +22,7 @@ declare(strict_types=1);
namespace App\Tests\Services\Parts;
use PHPUnit\Framework\Attributes\DataProvider;
use App\Entity\Parts\Part;
use App\Entity\PriceInformations\Orderdetail;
use App\Entity\PriceInformations\Pricedetail;
@ -43,7 +44,7 @@ class PricedetailHelperTest extends WebTestCase
$this->service = self::getContainer()->get(PricedetailHelper::class);
}
public function maxDiscountAmountDataProvider(): ?\Generator
public static function maxDiscountAmountDataProvider(): ?\Generator
{
$part = new Part();
yield [$part, null, 'Part without any orderdetails failed!'];
@ -81,9 +82,7 @@ class PricedetailHelperTest extends WebTestCase
yield [$part, 10.0, 'Part with multiple orderdetails failed'];
}
/**
* @dataProvider maxDiscountAmountDataProvider
*/
#[DataProvider('maxDiscountAmountDataProvider')]
public function testGetMaxDiscountAmount(Part $part, ?float $expected_result, string $message): void
{
$this->assertSame($expected_result, $this->service->getMaxDiscountAmount($part), $message);