mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Initial ugly re-factor of where fixtures are done.
This commit is contained in:
parent
5a631a6c74
commit
f586ed0394
1 changed files with 11 additions and 9 deletions
|
@ -27,14 +27,16 @@ PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
|
||||||
*/
|
*/
|
||||||
class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
|
class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
|
||||||
|
|
||||||
|
public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array()) {
|
||||||
/**
|
$fixture = new CakeFixtureManager;
|
||||||
* Sets the proper test suite to use and loads the test file in it.
|
foreach ($suite->getIterator() as $test) {
|
||||||
* this method gets called as a callback from the parent class
|
if ($test instanceof CakeTestCase) {
|
||||||
*
|
$fixture->fixturize($test);
|
||||||
* @return void
|
$test->fixtureManager = $fixture;
|
||||||
*/
|
}
|
||||||
protected function handleCustomTestSuite() {
|
}
|
||||||
|
$r = parent::doRun($suite, $arguments);
|
||||||
|
$fixture->shutdown();
|
||||||
|
return $r;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue