Merge pull request #10497 from swordbeta/2.next-update-phpunit

Make test suite compatible with PHPUnit 5.
This commit is contained in:
Mark Story 2017-05-08 09:44:04 -04:00 committed by GitHub
commit 88a804f552
3 changed files with 6 additions and 2 deletions

View file

@ -32,6 +32,9 @@ matrix:
- php: 7.0
env: PHPCS=1
- php: 7.1
env: DB=mysql PHPUNIT=5.7.19
before_script:
- composer global require "phpunit/phpunit=$PHPUNIT"

View file

@ -655,7 +655,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
* @deprecated 3.0.0 This is a compatibility wrapper for 1.x. It will be removed in 3.0.
* @return void
*/
protected function expectException($name = 'Exception', $message = '') {
public function expectException($name = 'Exception', $message = '') {
$this->setExpectedException($name, $message);
}

View file

@ -44,9 +44,10 @@ 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
* @return void
*/
public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array()) {
public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array(), $exit = true) {
if (isset($arguments['printer'])) {
static::$versionStringPrinted = true;
}