Skip to content
Permalink
Browse files

Make test suite compatible with PHPUnit 5.

  • Loading branch information...
Michael van Tricht
Michael van Tricht committed Apr 6, 2017
1 parent 68432f7 commit 10052edb204cd6e8b7b455c7029ada966624f756
Showing with 6 additions and 2 deletions.
  1. +3 −0 .travis.yml
  2. +1 −1 lib/Cake/TestSuite/CakeTestCase.php
  3. +2 −1 lib/Cake/TestSuite/CakeTestRunner.php
@@ -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"
@@ -655,7 +655,7 @@ protected function expectError($expected = false, $message = '') {
* @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);
}
@@ -44,9 +44,10 @@ public function __construct($loader, $params) {
*
* @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;
}

0 comments on commit 10052ed

Please sign in to comment.
You can’t perform that action at this time.