diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-12-20 21:12:54 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-12-20 21:12:54 +0000 |
commit | 2def99b226cab6c67f407c4fc979a99a8d4a3996 (patch) | |
tree | 79fbbbd165ad57d3fb8ff9bf94a71d85e86ec8c6 /modules | |
parent | e9f18147482f6a3e4b9e177d84e9deebd4410778 (diff) | |
download | brdo-2def99b226cab6c67f407c4fc979a99a8d4a3996.tar.gz brdo-2def99b226cab6c67f407c4fc979a99a8d4a3996.tar.bz2 |
- Patch #663828 by chx: allow core tests to be programmatically disabled.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/simpletest.api.php | 15 | ||||
-rw-r--r-- | modules/simpletest/simpletest.module | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/modules/simpletest/simpletest.api.php b/modules/simpletest/simpletest.api.php index 7de67d29d..c3507c9f2 100644 --- a/modules/simpletest/simpletest.api.php +++ b/modules/simpletest/simpletest.api.php @@ -12,6 +12,21 @@ */ /** + * Alter the list of tests. + * + * @param $groups + * A two dimension array, the first key is the test group (as defined in + * getInfo) the second is the name of the class and the value is the return + * value of the getInfo method. + */ +function hook_simpletest_alter(&$groups) { + // An alternative session handler module would not want to run the original + // Session https handling test because it checks the sessions table in the + // database. + unset($groups['Session']['testHttpsSession']); +} + +/** * A test group has started. * * This hook is called just once at the beginning of a test group. diff --git a/modules/simpletest/simpletest.module b/modules/simpletest/simpletest.module index 4dd8fe6a4..35f84c2a5 100644 --- a/modules/simpletest/simpletest.module +++ b/modules/simpletest/simpletest.module @@ -368,6 +368,8 @@ function simpletest_test_get_all() { uksort($tests, 'strnatcasecmp'); } + // Allow modules extending core tests to disable originals. + drupal_alter('simpletest', $groups); cache_set('simpletest', $groups); } } |