Permalink
Browse files

Only look for tests that are in the active modules. Update the contro…

…ller golden file to reflect the current location of files.
  • Loading branch information...
1 parent 2e99866 commit 703f22abcbf6c44818709d9daf3d272de98d9198 @talmdal talmdal committed Oct 23, 2009
@@ -9,6 +9,11 @@ modules/gallery/controllers/albums.php _form_add
modules/gallery/controllers/combined.php javascript DIRTY_AUTH
modules/gallery/controllers/combined.php css DIRTY_AUTH
modules/gallery/controllers/file_proxy.php __call DIRTY_CSRF|DIRTY_AUTH
+modules/gallery/controllers/login.php ajax DIRTY_AUTH
+modules/gallery/controllers/login.php auth_ajax DIRTY_AUTH
+modules/gallery/controllers/login.php html DIRTY_AUTH
+modules/gallery/controllers/login.php auth_html DIRTY_AUTH
+modules/gallery/controllers/logout.php index DIRTY_CSRF|DIRTY_AUTH
modules/gallery/controllers/maintenance.php index DIRTY_AUTH
modules/gallery/controllers/rest.php __construct DIRTY_AUTH
modules/gallery/controllers/rest.php __call DIRTY_AUTH
@@ -31,10 +36,5 @@ modules/server_add/controllers/admin_server_add.php autocomplete
modules/server_add/controllers/server_add.php children DIRTY_CSRF
modules/tag/controllers/admin_tags.php index DIRTY_CSRF
modules/tag/controllers/tags.php _show DIRTY_CSRF|DIRTY_AUTH
-modules/user/controllers/login.php ajax DIRTY_AUTH
-modules/user/controllers/login.php auth_ajax DIRTY_AUTH
-modules/user/controllers/login.php html DIRTY_AUTH
-modules/user/controllers/login.php auth_html DIRTY_AUTH
-modules/user/controllers/logout.php index DIRTY_CSRF|DIRTY_AUTH
modules/user/controllers/password.php reset DIRTY_AUTH
modules/user/controllers/password.php do_reset DIRTY_CSRF|DIRTY_AUTH
@@ -77,14 +77,6 @@ function Index() {
}
try {
- // Find all tests, excluding sample tests that come with the unit_test module.
- foreach (glob(MODPATH . "*/tests") as $path) {
- if ($path != MODPATH . "unit_test/tests") {
- $paths[] = $path;
- }
- }
- Kohana::config_set('unit_test.paths', $paths);
-
// Clean out the database
if ($tables = $db->list_tables()) {
foreach ($db->list_tables() as $table) {
@@ -107,22 +99,27 @@ function Index() {
// Rest the cascading class path
Kohana::config_set("core", Kohana::config_load("core"));
- // Install all modules
+ // Install the active modules
// Force gallery and user to be installed first to resolve dependencies.
gallery_installer::install(true);
module::load_modules();
module::install("user");
module::activate("user");
- $modules = array();
+ $modules = $paths =array();
foreach ($active_modules as $module) {
+ if (file_exists($path = MODPATH . "{$module->name}/tests")) {
+ $paths[] = $path;
+ }
if (in_array($module->name, array("gallery", "user"))) {
continue;
}
module::install($module->name);
module::activate($module->name);
}
+ Kohana::config_set('unit_test.paths', $paths);
+
// Trigger late-binding install actions (defined in gallery_event::user_login)
graphics::choose_default_toolkit();

0 comments on commit 703f22a

Please sign in to comment.