Pass $exit arguments to the parent doRun() method and $exit is false

This commit is contained in:
Koji Tanaka 2019-06-01 22:36:41 +09:00
parent 00aec4b4f5
commit d09e827f6c
2 changed files with 3 additions and 2 deletions

View file

@ -53,6 +53,7 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
* @param PHPUnit_Framework_Test $suite The test suite to run * @param PHPUnit_Framework_Test $suite The test suite to run
* @param array $arguments The CLI arguments * @param array $arguments The CLI arguments
* @param bool $exit Exits by default or returns the results * @param bool $exit Exits by default or returns the results
* This argument is ignored if >PHPUnit5.2.0
* @return void * @return void
*/ */
public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array(), $exit = true) { public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array(), $exit = true) {
@ -72,7 +73,7 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
} }
} }
$return = parent::doRun($suite, $arguments); $return = parent::doRun($suite, $arguments, $exit);
$fixture->shutdown(); $fixture->shutdown();
return $return; return $return;
} }

View file

@ -95,7 +95,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
unset($this->arguments['testFile']); unset($this->arguments['testFile']);
try { try {
$result = $runner->doRun($suite, $this->arguments); $result = $runner->doRun($suite, $this->arguments, false);
} catch (PHPUnit_Framework_Exception $e) { } catch (PHPUnit_Framework_Exception $e) {
print $e->getMessage() . "\n"; print $e->getMessage() . "\n";
} }