mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Merge pull request #13984 from othercorey/2.x-phpunit-warnings
2.x - Updated CakeTestSuiteCommand::run() exit logic to match phpunit's
This commit is contained in:
commit
13fba738f7
1 changed files with 7 additions and 4 deletions
|
@ -101,12 +101,15 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
|
|||
}
|
||||
|
||||
if ($exit) {
|
||||
if (isset($result) && $result->wasSuccessful()) {
|
||||
exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
|
||||
} elseif (!isset($result) || $result->errorCount() > 0) {
|
||||
if (!isset($result) || $result->errorCount() > 0) {
|
||||
exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
|
||||
}
|
||||
exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
|
||||
if ($result->failureCount() > 0) {
|
||||
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…
Add table
Reference in a new issue