|
2 | 2 |
|
3 | 3 | namespace PHPWatch\PHPCommitBuilder\Tests; |
4 | 4 |
|
| 5 | +use PHPUnit\Framework\Attributes\DataProvider; |
5 | 6 | use PHPWatch\PHPCommitBuilder\KeywordEnhancer; |
6 | 7 | use PHPUnit\Framework\TestCase; |
7 | 8 |
|
@@ -77,43 +78,28 @@ public static function dataCodifyText(): array { |
77 | 78 | ]; |
78 | 79 | } |
79 | 80 |
|
80 | | - /** |
81 | | - * @covers \PHPWatch\PHPCommitBuilder\KeywordEnhancer::enhance |
82 | | - */ |
83 | 81 | public function testReturnsVerbatimOnEmptyStrings(): void { |
84 | 82 | self::assertSame('', KeywordEnhancer::enhance('')); |
85 | 83 | self::assertSame(' ', KeywordEnhancer::enhance(' ')); |
86 | 84 | self::assertSame('test', KeywordEnhancer::enhance('test')); |
87 | 85 | } |
88 | 86 |
|
89 | | - /** |
90 | | - * @covers \PHPWatch\PHPCommitBuilder\KeywordEnhancer::linkToBug |
91 | | - * @dataProvider dataLinksToBugsPhp |
92 | | - */ |
| 87 | + #[DataProvider('dataLinksToBugsPhp')] |
93 | 88 | public function testLinksToBugsPhp(string $input, string $expected): void { |
94 | 89 | self::assertSame($expected, KeywordEnhancer::enhance($input)); |
95 | 90 | } |
96 | 91 |
|
97 | | - /** |
98 | | - * @covers \PHPWatch\PHPCommitBuilder\KeywordEnhancer::linkToGitHub |
99 | | - * @dataProvider dataLinkToGitHub |
100 | | - */ |
| 92 | + #[DataProvider('dataLinkToGitHub')] |
101 | 93 | public function testLinkToGitHub(string $input, string $expected): void { |
102 | 94 | self::assertSame($expected, KeywordEnhancer::enhance($input)); |
103 | 95 | } |
104 | 96 |
|
105 | | - /** |
106 | | - * @covers \PHPWatch\PHPCommitBuilder\KeywordEnhancer::linkToSecurityAnnouncements |
107 | | - * @dataProvider dataLinkToSecurityAnnouncements |
108 | | - */ |
| 97 | + #[DataProvider('dataLinkToSecurityAnnouncements')] |
109 | 98 | public function testLinkToSecurityAnnouncements(string $input, string $expected): void { |
110 | 99 | self::assertSame($expected, KeywordEnhancer::enhance($input)); |
111 | 100 | } |
112 | 101 |
|
113 | | - /** |
114 | | - * @covers \PHPWatch\PHPCommitBuilder\KeywordEnhancer::codifyText |
115 | | - * @dataProvider dataCodifyText |
116 | | - */ |
| 102 | + #[DataProvider('dataCodifyText')] |
117 | 103 | public function testCodifyText(string $input, string $expected): void { |
118 | 104 | self::assertSame($expected, KeywordEnhancer::enhance($input)); |
119 | 105 | } |
|
0 commit comments