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\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));