Conditions | 1 |
Paths | 1 |
Total Lines | 28 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | public function testClassCanLoad() |
||
10 | { |
||
11 | $phpmd = new PhpMdLoaderStrict(__DIR__ . '/fixtures/phpmd.xml'); |
||
12 | $lines = $phpmd->getLines(); |
||
13 | $file = '/full/path/to/file/src/CoverageCheck.php'; |
||
14 | $expected = [ |
||
15 | $file => [ |
||
16 | 56 => [ |
||
17 | 'The method addUnCoveredLine has a boolean flag argument ' . |
||
18 | '$message, which is a certain sign of a ' . |
||
19 | 'Single Responsibility Principle violation.' |
||
20 | ], |
||
21 | 57 => [ |
||
22 | 'The method addUnCoveredLine has a boolean flag argument ' . |
||
23 | '$message, which is a certain sign of a ' . |
||
24 | 'Single Responsibility Principle violation.' |
||
25 | ], |
||
26 | 58 => [ |
||
27 | 'The method addUnCoveredLine has a boolean flag argument ' . |
||
28 | '$message, which is a certain sign of a ' . |
||
29 | 'Single Responsibility Principle violation.' |
||
30 | ], |
||
31 | ], |
||
32 | ]; |
||
33 | $this->assertEquals($expected, $lines); |
||
34 | $this->assertFalse($phpmd->isValidLine($file, 57)); |
||
35 | $this->assertTrue($phpmd->isValidLine($file, 10)); |
||
36 | } |
||
37 | |||
45 |