@@ -30,17 +30,17 @@ public function testSuccessRed(): void
3030 $ this ->getDataFileAbsolutePath ('cobertura-red.xml ' )
3131 ]);
3232
33- $ this -> assertStringContainsString (
33+ self :: assertStringContainsString (
3434 $ this ->getDataFileContents ('success-red.txt ' ),
3535 $ process ->getOutput ()
3636 );
3737
38- $ this -> assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
39- $ this -> assertStringContainsString ('Time: ' , $ process ->getOutput ());
40- $ this -> assertStringContainsString ('Memory: ' , $ process ->getOutput ());
38+ self :: assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
39+ self :: assertStringContainsString ('Time: ' , $ process ->getOutput ());
40+ self :: assertStringContainsString ('Memory: ' , $ process ->getOutput ());
4141
42- $ this -> assertSame (2 , $ process ->getExitCode ());
43- $ this -> assertEmpty ($ process ->getErrorOutput ());
42+ self :: assertSame (2 , $ process ->getExitCode ());
43+ self :: assertEmpty ($ process ->getErrorOutput ());
4444 }
4545
4646 public function testNoColorSuccessRed (): void
@@ -51,17 +51,17 @@ public function testNoColorSuccessRed(): void
5151 $ this ->getDataFileAbsolutePath ('cobertura-red.xml ' )
5252 ]);
5353
54- $ this -> assertStringContainsString (
54+ self :: assertStringContainsString (
5555 $ this ->getDataFileContents ('no-color-success-red.txt ' ),
5656 $ process ->getOutput ()
5757 );
5858
59- $ this -> assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
60- $ this -> assertStringContainsString ('Time: ' , $ process ->getOutput ());
61- $ this -> assertStringContainsString ('Memory: ' , $ process ->getOutput ());
59+ self :: assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
60+ self :: assertStringContainsString ('Time: ' , $ process ->getOutput ());
61+ self :: assertStringContainsString ('Memory: ' , $ process ->getOutput ());
6262
63- $ this -> assertSame (2 , $ process ->getExitCode ());
64- $ this -> assertEmpty ($ process ->getErrorOutput ());
63+ self :: assertSame (2 , $ process ->getExitCode ());
64+ self :: assertEmpty ($ process ->getErrorOutput ());
6565 }
6666
6767 public function testNoColorSuccessIgnoreRed (): void
@@ -73,17 +73,17 @@ public function testNoColorSuccessIgnoreRed(): void
7373 $ this ->getDataFileAbsolutePath ('cobertura-red.xml ' )
7474 ]);
7575
76- $ this -> assertStringContainsString (
76+ self :: assertStringContainsString (
7777 $ this ->getDataFileContents ('no-color-success-red.txt ' ),
7878 $ process ->getOutput ()
7979 );
8080
81- $ this -> assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
82- $ this -> assertStringContainsString ('Time: ' , $ process ->getOutput ());
83- $ this -> assertStringContainsString ('Memory: ' , $ process ->getOutput ());
81+ self :: assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
82+ self :: assertStringContainsString ('Time: ' , $ process ->getOutput ());
83+ self :: assertStringContainsString ('Memory: ' , $ process ->getOutput ());
8484
85- $ this -> assertSame (3 , $ process ->getExitCode ());
86- $ this -> assertEmpty ($ process ->getErrorOutput ());
85+ self :: assertSame (3 , $ process ->getExitCode ());
86+ self :: assertEmpty ($ process ->getErrorOutput ());
8787 }
8888
8989 public function testNoColorSuccessGreen (): void
@@ -94,17 +94,17 @@ public function testNoColorSuccessGreen(): void
9494 $ this ->getDataFileAbsolutePath ('cobertura-green.xml ' )
9595 ]);
9696
97- $ this -> assertStringContainsString (
97+ self :: assertStringContainsString (
9898 $ this ->getDataFileContents ('no-color-success-green.txt ' ),
9999 $ process ->getOutput ()
100100 );
101101
102- $ this -> assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
103- $ this -> assertStringContainsString ('Time: ' , $ process ->getOutput ());
104- $ this -> assertStringContainsString ('Memory: ' , $ process ->getOutput ());
102+ self :: assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
103+ self :: assertStringContainsString ('Time: ' , $ process ->getOutput ());
104+ self :: assertStringContainsString ('Memory: ' , $ process ->getOutput ());
105105
106- $ this -> assertSame (0 , $ process ->getExitCode ());
107- $ this -> assertEmpty ($ process ->getErrorOutput ());
106+ self :: assertSame (0 , $ process ->getExitCode ());
107+ self :: assertEmpty ($ process ->getErrorOutput ());
108108 }
109109
110110 public function testNoColorSuccessFilterGreen (): void
@@ -116,17 +116,17 @@ public function testNoColorSuccessFilterGreen(): void
116116 $ this ->getDataFileAbsolutePath ('cobertura-green.xml ' )
117117 ]);
118118
119- $ this -> assertStringContainsString (
119+ self :: assertStringContainsString (
120120 $ this ->getDataFileContents ('no-color-success-green.txt ' ),
121121 $ process ->getOutput ()
122122 );
123123
124- $ this -> assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
125- $ this -> assertStringContainsString ('Time: ' , $ process ->getOutput ());
126- $ this -> assertStringContainsString ('Memory: ' , $ process ->getOutput ());
124+ self :: assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
125+ self :: assertStringContainsString ('Time: ' , $ process ->getOutput ());
126+ self :: assertStringContainsString ('Memory: ' , $ process ->getOutput ());
127127
128- $ this -> assertSame (0 , $ process ->getExitCode ());
129- $ this -> assertEmpty ($ process ->getErrorOutput ());
128+ self :: assertSame (0 , $ process ->getExitCode ());
129+ self :: assertEmpty ($ process ->getErrorOutput ());
130130 }
131131
132132 public function testNoColorSuccessFilterEmptyGreen (): void
@@ -138,17 +138,17 @@ public function testNoColorSuccessFilterEmptyGreen(): void
138138 $ this ->getDataFileAbsolutePath ('cobertura-green.xml ' )
139139 ]);
140140
141- $ this -> assertStringNotContainsString (
141+ self :: assertStringNotContainsString (
142142 $ this ->getDataFileContents ('no-color-success-green.txt ' ),
143143 $ process ->getOutput ()
144144 );
145145
146- $ this -> assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
147- $ this -> assertStringContainsString ('Time: ' , $ process ->getOutput ());
148- $ this -> assertStringContainsString ('Memory: ' , $ process ->getOutput ());
146+ self :: assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
147+ self :: assertStringContainsString ('Time: ' , $ process ->getOutput ());
148+ self :: assertStringContainsString ('Memory: ' , $ process ->getOutput ());
149149
150- $ this -> assertSame (0 , $ process ->getExitCode ());
151- $ this -> assertEmpty ($ process ->getErrorOutput ());
150+ self :: assertSame (0 , $ process ->getExitCode ());
151+ self :: assertEmpty ($ process ->getErrorOutput ());
152152 }
153153
154154 public function testNoColorSuccessYellow (): void
@@ -159,17 +159,17 @@ public function testNoColorSuccessYellow(): void
159159 $ this ->getDataFileAbsolutePath ('cobertura-yellow.xml ' )
160160 ]);
161161
162- $ this -> assertStringContainsString (
162+ self :: assertStringContainsString (
163163 $ this ->getDataFileContents ('no-color-success-yellow.txt ' ),
164164 $ process ->getOutput ()
165165 );
166166
167- $ this -> assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
168- $ this -> assertStringContainsString ('Time: ' , $ process ->getOutput ());
169- $ this -> assertStringContainsString ('Memory: ' , $ process ->getOutput ());
167+ self :: assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
168+ self :: assertStringContainsString ('Time: ' , $ process ->getOutput ());
169+ self :: assertStringContainsString ('Memory: ' , $ process ->getOutput ());
170170
171- $ this -> assertSame (3 , $ process ->getExitCode ());
172- $ this -> assertEmpty ($ process ->getErrorOutput ());
171+ self :: assertSame (3 , $ process ->getExitCode ());
172+ self :: assertEmpty ($ process ->getErrorOutput ());
173173 }
174174
175175 public function testNoColorSuccessIgnoreYellow (): void
@@ -181,49 +181,49 @@ public function testNoColorSuccessIgnoreYellow(): void
181181 $ this ->getDataFileAbsolutePath ('cobertura-yellow.xml ' )
182182 ]);
183183
184- $ this -> assertStringContainsString (
184+ self :: assertStringContainsString (
185185 $ this ->getDataFileContents ('no-color-success-yellow.txt ' ),
186186 $ process ->getOutput ()
187187 );
188188
189- $ this -> assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
190- $ this -> assertStringContainsString ('Time: ' , $ process ->getOutput ());
191- $ this -> assertStringContainsString ('Memory: ' , $ process ->getOutput ());
189+ self :: assertStringContainsString ('Exit code: ' , $ process ->getOutput ());
190+ self :: assertStringContainsString ('Time: ' , $ process ->getOutput ());
191+ self :: assertStringContainsString ('Memory: ' , $ process ->getOutput ());
192192
193- $ this -> assertSame (0 , $ process ->getExitCode ());
194- $ this -> assertEmpty ($ process ->getErrorOutput ());
193+ self :: assertSame (0 , $ process ->getExitCode ());
194+ self :: assertEmpty ($ process ->getErrorOutput ());
195195 }
196196
197197 public function testNoCoberturaFileError (): void
198198 {
199199 $ process = $ this ->runProcess ();
200200
201- $ this -> assertStringContainsString (
201+ self :: assertStringContainsString (
202202 'ERROR: Missing required argument: path to cobertura XML file. ' ,
203203 $ process ->getOutput ()
204204 );
205205
206- $ this -> assertSame (1 , $ process ->getExitCode ());
207- $ this -> assertEmpty ($ process ->getErrorOutput ());
206+ self :: assertSame (1 , $ process ->getExitCode ());
207+ self :: assertEmpty ($ process ->getErrorOutput ());
208208 }
209209
210210 public function testInitSuccess (): void
211211 {
212212 $ process = $ this ->runProcess ([
213213 '--init ' ,
214214 ]);
215-
215+
216216 unlink (
217217 (string ) realpath ((string ) getcwd () . '/phpunit-cobertura-formatter.yml.dist ' )
218218 );
219219
220- $ this -> assertStringContainsString (
220+ self :: assertStringContainsString (
221221 'Default config file created at ' ,
222222 $ process ->getOutput ()
223223 );
224224
225- $ this -> assertSame (0 , $ process ->getExitCode ());
226- $ this -> assertEmpty ($ process ->getErrorOutput ());
225+ self :: assertSame (0 , $ process ->getExitCode ());
226+ self :: assertEmpty ($ process ->getErrorOutput ());
227227 }
228228
229229 /**
0 commit comments