| Conditions | 1 |
| Paths | 1 |
| Total Lines | 27 |
| Code Lines | 20 |
| 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 = CodeceptionJSONReporter::class; |
||
| 23 | $params = [ |
||
| 24 | 'vendor/bin/codecept', |
||
| 25 | 'run', |
||
| 26 | '--silent', |
||
| 27 | '-e', |
||
| 28 | $extension, |
||
| 29 | '--override', |
||
| 30 | "extensions: config: {$extension}: output-path: {$debugDirectory}", |
||
| 31 | '-vvv', |
||
| 32 | ]; |
||
| 33 | |||
| 34 | $process = new Process($params); |
||
| 35 | |||
| 36 | $process |
||
| 37 | ->setWorkingDirectory($projectDirectory) |
||
| 38 | ->setTimeout(null) |
||
| 39 | ->run(); |
||
| 40 | |||
| 41 | return json_decode( |
||
| 42 | file_get_contents($debugDirectory . DIRECTORY_SEPARATOR . CodeceptionJSONReporter::FILENAME), |
||
| 43 | true |
||
| 44 | ); |
||
| 47 |