10
10
namespace SebastianBergmann \CodeCoverage ;
11
11
12
12
use function array_keys ;
13
- use PHP_Token_Stream ;
14
13
15
14
final class RawCodeCoverageDataTest extends TestCase
16
15
{
@@ -264,8 +263,7 @@ public function testRemoveCoverageDataForLines(): void
264
263
265
264
public function testUseStatementsAreUncovered (): void
266
265
{
267
- $ file = TEST_FILES_PATH . 'source_with_use_statements.php ' ;
268
- $ tokens = new PHP_Token_Stream ($ file );
266
+ $ file = TEST_FILES_PATH . 'source_with_use_statements.php ' ;
269
267
270
268
$ this ->assertEquals (
271
269
[
@@ -280,28 +278,26 @@ public function testUseStatementsAreUncovered(): void
280
278
21 ,
281
279
22 ,
282
280
],
283
- array_keys (RawCodeCoverageData::fromUncoveredFile ($ file, $ tokens )->lineCoverage ()[$ file ])
281
+ array_keys (RawCodeCoverageData::fromUncoveredFile ($ file )->lineCoverage ()[$ file ])
284
282
);
285
283
}
286
284
287
285
public function testEmptyClassesAreUncovered (): void
288
286
{
289
- $ file = TEST_FILES_PATH . 'source_with_empty_class.php ' ;
290
- $ tokens = new PHP_Token_Stream ($ file );
287
+ $ file = TEST_FILES_PATH . 'source_with_empty_class.php ' ;
291
288
292
289
$ this ->assertEquals (
293
290
[
294
291
12 ,
295
292
14 ,
296
293
],
297
- array_keys (RawCodeCoverageData::fromUncoveredFile ($ file, $ tokens )->lineCoverage ()[$ file ])
294
+ array_keys (RawCodeCoverageData::fromUncoveredFile ($ file )->lineCoverage ()[$ file ])
298
295
);
299
296
}
300
297
301
298
public function testInterfacesAreUncovered (): void
302
299
{
303
- $ file = TEST_FILES_PATH . 'source_with_interface.php ' ;
304
- $ tokens = new PHP_Token_Stream ($ file );
300
+ $ file = TEST_FILES_PATH . 'source_with_interface.php ' ;
305
301
306
302
$ this ->assertEquals (
307
303
[
@@ -316,14 +312,13 @@ public function testInterfacesAreUncovered(): void
316
312
16 ,
317
313
17 ,
318
314
],
319
- array_keys (RawCodeCoverageData::fromUncoveredFile ($ file, $ tokens )->lineCoverage ()[$ file ])
315
+ array_keys (RawCodeCoverageData::fromUncoveredFile ($ file )->lineCoverage ()[$ file ])
320
316
);
321
317
}
322
318
323
319
public function testInlineCommentsKeepTheLine (): void
324
320
{
325
- $ file = TEST_FILES_PATH . 'source_with_oneline_annotations.php ' ;
326
- $ tokens = new PHP_Token_Stream ($ file );
321
+ $ file = TEST_FILES_PATH . 'source_with_oneline_annotations.php ' ;
327
322
328
323
$ this ->assertEquals (
329
324
[
@@ -340,7 +335,7 @@ public function testInlineCommentsKeepTheLine(): void
340
335
35 ,
341
336
36 ,
342
337
],
343
- array_keys (RawCodeCoverageData::fromUncoveredFile ($ file, $ tokens )->lineCoverage ()[$ file ])
338
+ array_keys (RawCodeCoverageData::fromUncoveredFile ($ file )->lineCoverage ()[$ file ])
344
339
);
345
340
}
346
341
0 commit comments