Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function testOutput() |
||
18 | { |
||
19 | |||
20 | $file1 = 'src/ArgParser.php'; |
||
21 | $file2 = 'src/CoverageCheck.php'; |
||
22 | $expected = [ |
||
23 | $file1 => [ |
||
24 | 35 => 'Argument 1 (string) is int but \strlen() takes string', |
||
25 | ], |
||
26 | $file2 => [ |
||
27 | 172 => 'Argument 3 (message) is int but ' . |
||
28 | '\exussum12\CoverageChecker\CoverageCheck::addUnCoveredLine()' . |
||
29 | ' takes string defined at ./src/CoverageCheck.php:109' |
||
30 | ], |
||
31 | ]; |
||
32 | |||
33 | $lines = $this->phan->getLines(); |
||
34 | |||
35 | $this->assertCount(2, $lines); |
||
36 | $this->assertContains($expected[$file1][35], $lines[$file1][35]); |
||
37 | $this->assertContains($expected[$file2][172], $lines[$file2][172]); |
||
38 | |||
39 | $this->assertFalse($this->phan->isValidLine($file1, 35)); |
||
40 | $this->assertTrue($this->phan->isValidLine($file1, 30)); |
||
41 | } |
||
42 | |||
48 |