mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-10 13:32:44 +00:00
Fixing fixture loading after recent changes in App::core()
This commit is contained in:
parent
fea2ac23c7
commit
96fa5e79ba
2 changed files with 3 additions and 4 deletions
|
@ -80,7 +80,8 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
|
|||
*/
|
||||
protected function _getFixtureManager($arguments) {
|
||||
if (isset($arguments['fixtureManager'])) {
|
||||
if (App::import('Lib', 'test_suite/' . Inflector::underscore($arguments['fixtureManager']))) {
|
||||
App::uses($arguments['fixtureManager'], 'TestSuite');
|
||||
if (class_exists($arguments['fixtureManager'])) {
|
||||
return new $arguments['fixtureManager'];
|
||||
}
|
||||
throw new RuntimeException(__('Could not find fixture manager %s.', $arguments['fixtureManager']));
|
||||
|
|
|
@ -105,9 +105,7 @@ class CakeFixtureManager {
|
|||
|
||||
if (strpos($fixture, 'core.') === 0) {
|
||||
$fixture = substr($fixture, strlen('core.'));
|
||||
foreach (App::core('cake') as $key => $path) {
|
||||
$fixturePaths[] = $path . 'tests' . DS . 'fixtures';
|
||||
}
|
||||
$fixturePaths[] = LIBS . 'tests' . DS . 'fixtures';
|
||||
} elseif (strpos($fixture, 'app.') === 0) {
|
||||
$fixture = substr($fixture, strlen('app.'));
|
||||
$fixturePaths = array(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue