8
8
use Kynx \Code \Normalizer \AbstractNormalizer ;
9
9
use Kynx \Code \Normalizer \NormalizerException ;
10
10
use Kynx \Code \Normalizer \NormalizerInterface ;
11
+ use Kynx \Code \Normalizer \PhpLabel ;
11
12
use Kynx \Code \Normalizer \WordCase ;
13
+ use PHPUnit \Framework \Attributes \CoversClass ;
14
+ use PHPUnit \Framework \Attributes \DataProvider ;
15
+ use PHPUnit \Framework \Attributes \UsesClass ;
12
16
use PHPUnit \Framework \TestCase ;
13
17
14
18
use function version_compare ;
15
19
16
20
use const PHP_VERSION ;
17
21
18
- /**
19
- * @uses \Kynx\Code\Normalizer\NormalizerException
20
- * @uses \Kynx\Code\Normalizer\PhpLabel
21
- * @uses \Kynx\Code\Normalizer\WordCase
22
- *
23
- * @covers \Kynx\Code\Normalizer\AbstractNormalizer
24
- */
22
+ #[CoversClass(AbstractNormalizer::class)]
23
+ #[UsesClass(NormalizerException::class)]
24
+ #[UsesClass(PhpLabel::class)]
25
+ #[UsesClass(WordCase::class)]
25
26
final class AbstractNormalizerTest extends TestCase
26
27
{
27
- /**
28
- * @dataProvider labelProvider
29
- */
28
+ #[DataProvider('labelProvider ' )]
30
29
public function testNormalize (string $ label , string $ expected ): void
31
30
{
32
31
$ actual = $ this ->getNormalizer ()->normalize ($ label );
@@ -59,9 +58,7 @@ public static function labelProvider(): array
59
58
];
60
59
}
61
60
62
- /**
63
- * @dataProvider caseProvider
64
- */
61
+ #[DataProvider('caseProvider ' )]
65
62
public function testNormalizeUsesCase (WordCase $ case , string $ expected ): void
66
63
{
67
64
$ actual = $ this ->getNormalizer ($ case )->normalize ('foo bar ' );
@@ -81,9 +78,7 @@ public static function caseProvider(): array
81
78
];
82
79
}
83
80
84
- /**
85
- * @dataProvider spellOutCaseProvider
86
- */
81
+ #[DataProvider('spellOutCaseProvider ' )]
87
82
public function testSpellOutCase (WordCase $ case , string $ label , string $ expected ): void
88
83
{
89
84
$ actual = $ this ->getNormalizer ($ case )->normalize ($ label );
@@ -151,9 +146,7 @@ public function testPrepareSuffixAllowsNullAndAssertionErrorThrown(): void
151
146
$ normalizer ->normalize ('class ' );
152
147
}
153
148
154
- /**
155
- * @dataProvider invalidSuffixProvider
156
- */
149
+ #[DataProvider('invalidSuffixProvider ' )]
157
150
public function testPrepareSuffixInvalidThrowsException (string $ suffix ): void
158
151
{
159
152
self ::expectException (NormalizerException::class);
0 commit comments