Fixing fixture loading after recent changes in App::core()

This commit is contained in:
Jose Lorenzo Rodriguez 2011-03-12 00:27:50 -04:30
parent fea2ac23c7
commit 96fa5e79ba
2 changed files with 3 additions and 4 deletions

View file

@ -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']));

View file

@ -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(