mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 22:59:52 +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\Misc;
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use App\Services\Misc\RangeParser;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
|
@ -96,9 +97,7 @@ class RangeParserTest extends WebTestCase
|
|||
yield [false, '1, 2 test'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider dataProvider
|
||||
*/
|
||||
#[DataProvider('dataProvider')]
|
||||
public function testParse(array $expected, string $input, bool $must_throw = false): void
|
||||
{
|
||||
if ($must_throw) {
|
||||
|
@ -109,9 +108,7 @@ class RangeParserTest extends WebTestCase
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider validDataProvider
|
||||
*/
|
||||
#[DataProvider('validDataProvider')]
|
||||
public function testIsValidRange(bool $expected, string $input): void
|
||||
{
|
||||
$this->assertSame($expected, $this->service->isValidRange($input));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue