mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-29 14:28:42 +02:00
Migrated phpunit annotations to attributes
This commit is contained in:
parent
f1d34bbc24
commit
dc480f755c
50 changed files with 171 additions and 246 deletions
|
@ -41,6 +41,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Tests\Services\LabelSystem\BarcodeScanner;
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use App\Entity\LabelSystem\LabelSupportedElement;
|
||||
use App\Services\LabelSystem\BarcodeScanner\BarcodeScanHelper;
|
||||
use App\Services\LabelSystem\BarcodeScanner\BarcodeScanResultInterface;
|
||||
|
@ -140,17 +141,13 @@ class BarcodeScanHelperTest extends WebTestCase
|
|||
yield [''];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider dataProvider
|
||||
*/
|
||||
#[DataProvider('dataProvider')]
|
||||
public function testNormalizeBarcodeContent(BarcodeScanResultInterface $expected, string $input): void
|
||||
{
|
||||
$this->assertEquals($expected, $this->service->scanBarcodeContent($input));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider invalidDataProvider
|
||||
*/
|
||||
#[DataProvider('invalidDataProvider')]
|
||||
public function testInvalidFormats(string $input): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue