Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Ensure a module is actually installed before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Nov 19, 2014
1 parent 858b434 commit 7515950
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/ControllerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ private function _initModule()
}
}

require_once BASE_PATH.'/core/controllers/components/UtilityComponent.php';
$utilityComponent = MidasLoader::loadComponent('Utility');

require_once BASE_PATH.'/core/ApiController.php';
$frontController->addControllerDirectory(BASE_PATH.'/core/controllers/api', 'rest');
// add RESTful route for web APIs
Expand Down Expand Up @@ -212,6 +213,7 @@ private function _initModule()
if (file_exists(BASE_PATH.'/modules/'.$route.'/models/AppModel.php')) {
require_once BASE_PATH.'/modules/'.$route.'/models/AppModel.php';
}
$utilityComponent->installModule($m);
}
Zend_Registry::set('modulesEnable', $listeModule);
Zend_Registry::set('modulesHaveApi', $apiModules);
Expand Down

0 comments on commit 7515950

Please sign in to comment.