diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-23 09:24:09 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-23 09:41:33 -0700 |
commit | 703f22abcbf6c44818709d9daf3d272de98d9198 (patch) | |
tree | d2b01c1a43735a61f8db6d8c647e82d3a17970b3 /modules | |
parent | 2e998664d57bcaf38e8d1dc19606768bd6f557a3 (diff) |
Only look for tests that are in the active modules. Update the controller golden file to reflect the current location of files.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/tests/controller_auth_data.txt | 10 | ||||
-rw-r--r-- | modules/gallery_unit_test/controllers/gallery_unit_test.php | 17 |
2 files changed, 12 insertions, 15 deletions
diff --git a/modules/gallery/tests/controller_auth_data.txt b/modules/gallery/tests/controller_auth_data.txt index fdf00c5e..30102538 100644 --- a/modules/gallery/tests/controller_auth_data.txt +++ b/modules/gallery/tests/controller_auth_data.txt @@ -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 diff --git a/modules/gallery_unit_test/controllers/gallery_unit_test.php b/modules/gallery_unit_test/controllers/gallery_unit_test.php index 85747884..f72b1b08 100644 --- a/modules/gallery_unit_test/controllers/gallery_unit_test.php +++ b/modules/gallery_unit_test/controllers/gallery_unit_test.php @@ -77,14 +77,6 @@ class Gallery_Unit_Test_Controller extends Controller { } 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,15 +99,18 @@ class Gallery_Unit_Test_Controller extends Controller { // 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; } @@ -123,6 +118,8 @@ class Gallery_Unit_Test_Controller extends Controller { 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(); |