Total Complexity | 5 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class PhpStanTest extends TestCase |
||
8 | { |
||
9 | /** @var PhpStan */ |
||
10 | protected $stan; |
||
11 | |||
12 | public function setUp() |
||
13 | { |
||
14 | $file = __DIR__ . '/../fixtures/phpstan.txt'; |
||
15 | $this->stan = new PhpStan($file); |
||
16 | } |
||
17 | |||
18 | public function testGetOutput() |
||
19 | { |
||
20 | $expected = [ |
||
21 | 'src/PhpStanLoader.php', |
||
22 | 'src/PhpCsLoader.php', |
||
23 | ]; |
||
24 | |||
25 | $this->assertSame($expected, $this->stan->parseLines()); |
||
26 | } |
||
27 | |||
28 | public function testInvalidLine() |
||
29 | { |
||
30 | $this->stan->parseLines(); |
||
31 | $this->assertEquals( |
||
32 | ['Access to an undefined property exussum12\CoverageChecker\PhpStanLoader::$invalidLines.'], |
||
33 | $this->stan->getErrorsOnLine("src/PhpStanLoader.php", 45) |
||
34 | ); |
||
35 | } |
||
36 | |||
37 | public function testValidLine() |
||
43 | ); |
||
44 | } |
||
45 | |||
46 | public function testNotFoundFile() |
||
49 | } |
||
50 | } |
||
51 |