Skip to content

Commit

Permalink
Make test suite compatible with PHPUnit 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtricht committed Apr 6, 2017
1 parent 68432f7 commit 10052ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/TestSuite/CakeTestCase.php
Expand Up @@ -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);
}

Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/TestSuite/CakeTestRunner.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit 10052ed

Please sign in to comment.