From d09e827f6cdb26aa7c3aa00dd46bff7465fd7fb7 Mon Sep 17 00:00:00 2001 From: Koji Tanaka Date: Sat, 1 Jun 2019 22:36:41 +0900 Subject: [PATCH] Pass $exit arguments to the parent doRun() method and $exit is false --- lib/Cake/TestSuite/CakeTestRunner.php | 3 ++- lib/Cake/TestSuite/CakeTestSuiteCommand.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Cake/TestSuite/CakeTestRunner.php b/lib/Cake/TestSuite/CakeTestRunner.php index f6a7b976d..29c451b8e 100644 --- a/lib/Cake/TestSuite/CakeTestRunner.php +++ b/lib/Cake/TestSuite/CakeTestRunner.php @@ -53,6 +53,7 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner { * @param PHPUnit_Framework_Test $suite The test suite to run * @param array $arguments The CLI arguments * @param bool $exit Exits by default or returns the results + * This argument is ignored if >PHPUnit5.2.0 * @return void */ 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(); return $return; } diff --git a/lib/Cake/TestSuite/CakeTestSuiteCommand.php b/lib/Cake/TestSuite/CakeTestSuiteCommand.php index c760d5d59..9e1cda5fc 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteCommand.php +++ b/lib/Cake/TestSuite/CakeTestSuiteCommand.php @@ -95,7 +95,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command { unset($this->arguments['testFile']); try { - $result = $runner->doRun($suite, $this->arguments); + $result = $runner->doRun($suite, $this->arguments, false); } catch (PHPUnit_Framework_Exception $e) { print $e->getMessage() . "\n"; }