diff --git a/tests/GitPhp/bootstrap.php b/tests/GitPhp/bootstrap.php index f9b8cd1..cbf8934 100644 --- a/tests/GitPhp/bootstrap.php +++ b/tests/GitPhp/bootstrap.php @@ -8,5 +8,24 @@ function test($cb) { - $cb(); + try { + $cb(); + + } catch (CzProject\GitPhp\GitException $e) { + $result = $e->getRunnerResult(); + + if ($result !== NULL) { + echo $result->getCommand(), "\n"; + echo 'EXIT CODE: ', $result->getExitCode(), "\n"; + echo "--------------\n", + $result->getOutputAsString(), "\n"; + + if ($result->hasErrorOutput()) { + echo "--------------\n", + implode("\n", $result->getErrorOutput()), "\n"; + } + } + + throw $e; + } }