7
7
use DigitalRevolution \CodeCoverageInspection \Lib \Config \ConfigViolation ;
8
8
use DigitalRevolution \CodeCoverageInspection \Lib \Config \InspectConfig ;
9
9
use org \bovigo \vfs \vfsStream ;
10
+ use PHPUnit \Framework \Attributes \CoversClass ;
10
11
use PHPUnit \Framework \TestCase ;
11
12
use Symfony \Component \Console \Input \InputInterface ;
12
13
13
- /**
14
- * @coversDefaultClass \DigitalRevolution\CodeCoverageInspection\Lib\Config\ConfigFactory
15
- * @covers ::getReport
16
- */
14
+ #[CoversClass(ConfigFactory::class)]
17
15
class ConfigFactoryTest extends TestCase
18
16
{
19
17
private ConfigFactory $ factory ;
@@ -25,9 +23,6 @@ protected function setUp(): void
25
23
$ this ->factory = new ConfigFactory ();
26
24
}
27
25
28
- /**
29
- * @covers ::createInspectConfig
30
- */
31
26
public function testCreateInspectConfigMinimal (): void
32
27
{
33
28
$ configPath = $ this ->filepath . 'config.xml ' ;
@@ -50,9 +45,6 @@ public function testCreateInspectConfigMinimal(): void
50
45
static ::assertTrue ($ config ->isExitCodeOnFailure ());
51
46
}
52
47
53
- /**
54
- * @covers ::createInspectConfig
55
- */
56
48
public function testCreateInspectConfigMultiReport (): void
57
49
{
58
50
$ configPath = $ this ->filepath . 'config.xml ' ;
@@ -75,9 +67,6 @@ public function testCreateInspectConfigMultiReport(): void
75
67
static ::assertFalse ($ config ->isExitCodeOnFailure ());
76
68
}
77
69
78
- /**
79
- * @covers ::createInspectConfig
80
- */
81
70
public function testCreateInspectConfigInvalidCoverage (): void
82
71
{
83
72
$ configPath = $ this ->filepath . 'config.xml ' ;
@@ -93,9 +82,6 @@ public function testCreateInspectConfigInvalidCoverage(): void
93
82
static ::assertEquals (new ConfigViolation ('Coverage argument should be an array ' ), $ config );
94
83
}
95
84
96
- /**
97
- * @covers ::createInspectConfig
98
- */
99
85
public function testCreateInspectConfigInvalidBaseDir (): void
100
86
{
101
87
$ configPath = $ this ->filepath . 'config.xml ' ;
@@ -111,9 +97,6 @@ public function testCreateInspectConfigInvalidBaseDir(): void
111
97
static ::assertEquals (new ConfigViolation ('--base-dir expecting a value string as argument ' ), $ config );
112
98
}
113
99
114
- /**
115
- * @covers ::createInspectConfig
116
- */
117
100
public function testCreateInspectConfigInvalidGitlabReport (): void
118
101
{
119
102
$ configPath = $ this ->filepath . 'config.xml ' ;
@@ -129,9 +112,6 @@ public function testCreateInspectConfigInvalidGitlabReport(): void
129
112
static ::assertEquals (new ConfigViolation ('--reportGitlab expecting the value to absent or string argument ' ), $ config );
130
113
}
131
114
132
- /**
133
- * @covers ::createInspectConfig
134
- */
135
115
public function testCreateInspectConfigInvalidCheckstyleReport (): void
136
116
{
137
117
$ configPath = $ this ->filepath . 'config.xml ' ;
@@ -147,9 +127,6 @@ public function testCreateInspectConfigInvalidCheckstyleReport(): void
147
127
static ::assertEquals (new ConfigViolation ('--reportCheckstyle expecting the value to absent or string argument ' ), $ config );
148
128
}
149
129
150
- /**
151
- * @covers ::createInspectConfig
152
- */
153
130
public function testCreateInspectConfigInvalidTextReport (): void
154
131
{
155
132
$ configPath = $ this ->filepath . 'config.xml ' ;
@@ -165,9 +142,6 @@ public function testCreateInspectConfigInvalidTextReport(): void
165
142
static ::assertEquals (new ConfigViolation ('--reportText expecting the value to absent or string argument ' ), $ config );
166
143
}
167
144
168
- /**
169
- * @covers ::createInspectConfig
170
- */
171
145
public function testCreateInspectConfigDuplicateOutputReport (): void
172
146
{
173
147
$ configPath = $ this ->filepath . 'config.xml ' ;
0 commit comments