| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function run() |
||
| 18 | { |
||
| 19 | $projectDirectory = $this->aliases->get('@root'); |
||
| 20 | $debugDirectory = $this->aliases->get('@runtime/debug'); |
||
| 21 | |||
| 22 | $extension = PHPUnitJSONReporter::class; |
||
| 23 | $params = [ |
||
| 24 | 'vendor/bin/phpunit', |
||
| 25 | '--printer', |
||
| 26 | $extension, |
||
| 27 | '-vvv', |
||
| 28 | ]; |
||
| 29 | |||
| 30 | $process = new Process($params); |
||
| 31 | |||
| 32 | $process |
||
| 33 | ->setEnv([PHPUnitJSONReporter::ENVIRONMENT_VARIABLE_DIRECTORY_NAME => $debugDirectory]) |
||
| 34 | ->setWorkingDirectory($projectDirectory) |
||
| 35 | ->setTimeout(null) |
||
| 36 | ->run(); |
||
| 37 | |||
| 38 | return json_decode( |
||
| 39 | file_get_contents($debugDirectory . DIRECTORY_SEPARATOR . PHPUnitJSONReporter::FILENAME), |
||
| 40 | true |
||
| 41 | ); |
||
| 44 |