mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-22 23:07:20 +00:00
Updated CakeTestSuiteCommand::run() exit logic to match phpunit's behavior now that doRun() is called with =false.
This commit is contained in:
parent
0992fa1c41
commit
eda72a6f3b
1 changed files with 7 additions and 4 deletions
|
@ -101,13 +101,16 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($exit) {
|
if ($exit) {
|
||||||
if (isset($result) && $result->wasSuccessful()) {
|
if (!isset($result) || $result->errorCount() > 0) {
|
||||||
exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
|
|
||||||
} elseif (!isset($result) || $result->errorCount() > 0) {
|
|
||||||
exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
|
exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
|
||||||
}
|
}
|
||||||
|
if ($result->failureCount() > 0) {
|
||||||
exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
|
exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Default to success even if there are warnings to match phpunit's behavior
|
||||||
|
exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue