Skip to content

Commit

Permalink
Fixing fixture loading after recent changes in App::core()
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 12, 2011
1 parent fea2ac2 commit 96fa5e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/Cake/TestSuite/CakeTestRunner.php
Expand Up @@ -80,7 +80,8 @@ protected function createTestResult() {
*/
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']));
Expand Down
4 changes: 1 addition & 3 deletions lib/Cake/TestSuite/Fixture/CakeFixtureManager.php
Expand Up @@ -105,9 +105,7 @@ protected function _loadFixtures($fixtures) {

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(
Expand Down

0 comments on commit 96fa5e7

Please sign in to comment.