mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Make test suites compatible with PHPUnit 4.8
This commit is contained in:
parent
31a1837c1d
commit
23080c443e
3 changed files with 8 additions and 4 deletions
|
@ -15,7 +15,7 @@
|
|||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
if (!defined('__PHPUNIT_PHAR__')) {
|
||||
if (!class_exists('PHPUnit_TextUI_TestRunner')) {
|
||||
require_once 'PHPUnit/TextUI/TestRunner.php';
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,11 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
|
|||
}
|
||||
|
||||
$fixture = $this->_getFixtureManager($arguments);
|
||||
foreach ($suite->getIterator() as $test) {
|
||||
$iterator = $suite->getIterator();
|
||||
if ($iterator instanceof RecursiveIterator) {
|
||||
$iterator = new RecursiveIteratorIterator($iterator);
|
||||
}
|
||||
foreach ($iterator as $test) {
|
||||
if ($test instanceof CakeTestCase) {
|
||||
$fixture->fixturize($test);
|
||||
$test->fixtureManager = $fixture;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
if (!defined('__PHPUNIT_PHAR__')) {
|
||||
if (!class_exists('PHPUnit_TextUI_Command')) {
|
||||
require_once 'PHPUnit/TextUI/Command.php';
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
if (!defined('__PHPUNIT_PHAR__')) {
|
||||
if (!class_exists('PHPUnit_TextUI_ResultPrinter')) {
|
||||
require_once 'PHPUnit/TextUI/ResultPrinter.php';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue