Migrated phpunit annotations to attributes

This commit is contained in:
Jan Böhmer 2025-07-14 00:32:06 +02:00
parent f1d34bbc24
commit dc480f755c
50 changed files with 171 additions and 246 deletions

View file

@ -41,6 +41,7 @@ declare(strict_types=1);
namespace App\Tests\Services\LabelSystem\Barcodes;
use PHPUnit\Framework\Attributes\DataProvider;
use App\Entity\Parts\Part;
use App\Entity\Parts\PartLot;
use App\Entity\Parts\StorageLocation;
@ -71,17 +72,13 @@ class BarcodeContentGeneratorTest extends KernelTestCase
yield ['/scan/location/0', StorageLocation::class];
}
/**
* @dataProvider Barcode1DDataProvider
*/
#[DataProvider('Barcode1DDataProvider')]
public function testGet1DBarcodeContent(string $expected, string $class): void
{
$this->assertSame($expected, $this->service->get1DBarcodeContent(new $class()));
}
/**
* @dataProvider Barcode2DDataProvider
*/
#[DataProvider('Barcode2DDataProvider')]
public function testGetURLContent(string $expected, string $class): void
{
$url = $this->service->getURLContent(new $class());