1111
1212namespace Symfony \Component \String \Tests ;
1313
14+ use PHPUnit \Framework \Attributes \DataProvider ;
15+ use PHPUnit \Framework \Attributes \RequiresPhpExtension ;
1416use Symfony \Component \String \Exception \InvalidArgumentException ;
1517
1618abstract class AbstractUnicodeTestCase extends AbstractAsciiTestCase
@@ -50,11 +52,8 @@ public function testAsciiClosureRule()
5052 $ this ->assertSame ('Dieser Wert sollte grOEsser oder gleich ' , (string ) $ s ->ascii ([$ rule ]));
5153 }
5254
53- /**
54- * @dataProvider provideLocaleLower
55- *
56- * @requires extension intl
57- */
55+ #[DataProvider('provideLocaleLower ' )]
56+ #[RequiresPhpExtension('intl ' )]
5857 public function testLocaleLower (string $ locale , string $ expected , string $ origin )
5958 {
6059 $ instance = static ::createFromString ($ origin )->localeLower ($ locale );
@@ -64,11 +63,8 @@ public function testLocaleLower(string $locale, string $expected, string $origin
6463 $ this ->assertSame ($ expected , (string ) $ instance );
6564 }
6665
67- /**
68- * @dataProvider provideLocaleUpper
69- *
70- * @requires extension intl
71- */
66+ #[DataProvider('provideLocaleUpper ' )]
67+ #[RequiresPhpExtension('intl ' )]
7268 public function testLocaleUpper (string $ locale , string $ expected , string $ origin )
7369 {
7470 $ instance = static ::createFromString ($ origin )->localeUpper ($ locale );
@@ -78,11 +74,8 @@ public function testLocaleUpper(string $locale, string $expected, string $origin
7874 $ this ->assertSame ($ expected , (string ) $ instance );
7975 }
8076
81- /**
82- * @dataProvider provideLocaleTitle
83- *
84- * @requires extension intl
85- */
77+ #[DataProvider('provideLocaleTitle ' )]
78+ #[RequiresPhpExtension('intl ' )]
8679 public function testLocaleTitle (string $ locale , string $ expected , string $ origin )
8780 {
8881 $ instance = static ::createFromString ($ origin )->localeTitle ($ locale );
@@ -117,9 +110,7 @@ public static function provideBytesAt(): array
117110 );
118111 }
119112
120- /**
121- * @dataProvider provideCodePointsAt
122- */
113+ #[DataProvider('provideCodePointsAt ' )]
123114 public function testCodePointsAt (array $ expected , string $ string , int $ offset , ?int $ form = null )
124115 {
125116 if (2 !== grapheme_strlen ('च्छे ' ) && 'नमस्ते ' === $ string ) {
0 commit comments