Conditions | 2 |
Paths | 3 |
Total Lines | 30 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function testRelatedMethods() |
||
14 | { |
||
15 | $GLOBALS['argv'] = [ |
||
16 | 'diffFilter', |
||
17 | '--phpcs', |
||
18 | '--report=json', |
||
19 | __DIR__ . '/fixtures/DocBlocks.txt', |
||
20 | __DIR__ . '/fixtures/DocBlocks.json' |
||
21 | ]; |
||
22 | |||
23 | try { |
||
24 | ob_start(); |
||
25 | require(__DIR__ . "/../src/Runners/generic.php"); |
||
26 | } catch (Exception $exception) { |
||
27 | $output = json_decode(ob_get_clean()); |
||
28 | $file = $output->violations->{'DocBlocks.php'}; |
||
29 | $this->assertEquals( |
||
30 | 14, |
||
31 | count($file) |
||
32 | ); |
||
33 | |||
34 | $this->assertEquals( |
||
35 | 5, |
||
36 | count($file[12]->message) |
||
37 | ); |
||
38 | |||
39 | return true; |
||
40 | } |
||
41 | |||
42 | $this->fail('Exception not thrown when Expected'); |
||
43 | } |
||
68 |