1111
1212namespace Symfony \UX \Toolkit \Tests ;
1313
14+ use PHPUnit \Framework \Attributes \DataProvider ;
1415use PHPUnit \Framework \TestCase ;
1516use Symfony \UX \Toolkit \Assert ;
1617
1718class AssertTest extends TestCase
1819{
19- /**
20- * @dataProvider provideValidKitNames
21- */
20+ #[DataProvider('provideValidKitNames ' )]
2221 public function testValidKitName (string $ name )
2322 {
2423 $ this ->expectNotToPerformAssertions ();
@@ -50,9 +49,7 @@ public static function provideValidKitNames(): \Generator
5049 yield ['my_kit ' ];
5150 }
5251
53- /**
54- * @dataProvider provideInvalidKitNames
55- */
52+ #[DataProvider('provideInvalidKitNames ' )]
5653 public function testInvalidKitName (string $ name )
5754 {
5855 $ this ->expectException (\InvalidArgumentException::class);
@@ -82,9 +79,7 @@ public static function provideInvalidKitNames(): \Generator
8279 yield ['.abc ' ];
8380 }
8481
85- /**
86- * @dataProvider provideValidComponentNames
87- */
82+ #[DataProvider('provideValidComponentNames ' )]
8883 public function testValidComponentName (string $ name )
8984 {
9085 $ this ->expectNotToPerformAssertions ();
@@ -106,9 +101,7 @@ public static function provideValidComponentNames(): iterable
106101 yield ['Component123:Sub456 ' ];
107102 }
108103
109- /**
110- * @dataProvider provideInvalidComponentNames
111- */
104+ #[DataProvider('provideInvalidComponentNames ' )]
112105 public function testInvalidComponentName (string $ name )
113106 {
114107 $ this ->expectException (\InvalidArgumentException::class);
@@ -143,9 +136,7 @@ public static function provideInvalidComponentNames(): iterable
143136 yield ['123:456 ' ];
144137 }
145138
146- /**
147- * @dataProvider provideValidPhpPackageNames
148- */
139+ #[DataProvider('provideValidPhpPackageNames ' )]
149140 public function testValidPhpPackageName (string $ name )
150141 {
151142 $ this ->expectNotToPerformAssertions ();
@@ -159,9 +150,7 @@ public static function provideValidPhpPackageNames(): iterable
159150 yield ['tales-from-a-dev/twig-tailwind-extra ' ];
160151 }
161152
162- /**
163- * @dataProvider provideInvalidPhpPackageNames
164- */
153+ #[DataProvider('provideInvalidPhpPackageNames ' )]
165154 public function testInvalidPhpPackageName (string $ name )
166155 {
167156 $ this ->expectException (\InvalidArgumentException::class);
@@ -178,9 +167,7 @@ public static function provideInvalidPhpPackageNames(): iterable
178167 yield ['twig/html-extra/twig ' ];
179168 }
180169
181- /**
182- * @dataProvider provideValidNpmPackageNames
183- */
170+ #[DataProvider('provideValidNpmPackageNames ' )]
184171 public function testValidNpmPackageName (string $ name )
185172 {
186173 $ this ->expectNotToPerformAssertions ();
@@ -202,9 +189,7 @@ public static function provideValidNpmPackageNames(): iterable
202189 yield ['~foo ' ];
203190 }
204191
205- /**
206- * @dataProvider provideInvalidNpmPackageNames
207- */
192+ #[DataProvider('provideInvalidNpmPackageNames ' )]
208193 public function testInvalidNpmPackageName (string $ name )
209194 {
210195 $ this ->expectException (\InvalidArgumentException::class);
0 commit comments