mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-26 16:57:18 +00:00
Make test suite compatible with PHPUnit 5.
This commit is contained in:
parent
68432f77de
commit
10052edb20
3 changed files with 6 additions and 2 deletions
|
@ -32,6 +32,9 @@ matrix:
|
||||||
- php: 7.0
|
- php: 7.0
|
||||||
env: PHPCS=1
|
env: PHPCS=1
|
||||||
|
|
||||||
|
- php: 7.1
|
||||||
|
env: DB=mysql PHPUNIT=5.7.19
|
||||||
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- composer global require "phpunit/phpunit=$PHPUNIT"
|
- composer global require "phpunit/phpunit=$PHPUNIT"
|
||||||
|
|
|
@ -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.
|
* @deprecated 3.0.0 This is a compatibility wrapper for 1.x. It will be removed in 3.0.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function expectException($name = 'Exception', $message = '') {
|
public function expectException($name = 'Exception', $message = '') {
|
||||||
$this->setExpectedException($name, $message);
|
$this->setExpectedException($name, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,10 @@ 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
|
||||||
* @return void
|
* @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'])) {
|
if (isset($arguments['printer'])) {
|
||||||
static::$versionStringPrinted = true;
|
static::$versionStringPrinted = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue