| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function testValid() |
||
|
|
|||
| 11 | { |
||
| 12 | $GLOBALS['argv'] = [ |
||
| 13 | 'phpunitDiffFilter', |
||
| 14 | '--phpmnd', |
||
| 15 | __DIR__ . '/fixtures/change.txt', |
||
| 16 | __DIR__ . '/fixtures/phpmnd.txt' |
||
| 17 | ]; |
||
| 18 | ob_start(); |
||
| 19 | require(__DIR__ . "/../src/Runners/generic.php"); |
||
| 20 | $output = ob_get_clean(); |
||
| 21 | $this->assertContains('100.00%', $output); |
||
| 22 | } |
||
| 23 | } |
||
| 24 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: