=== modified file 'modules/simpletest/simpletest.api.php' --- modules/simpletest/simpletest.api.php 2009-07-11 13:56:21 +0000 +++ modules/simpletest/simpletest.api.php 2009-12-19 10:13:01 +0000 @@ -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. === modified file 'modules/simpletest/simpletest.module' --- modules/simpletest/simpletest.module 2009-12-15 05:25:47 +0000 +++ modules/simpletest/simpletest.module 2009-12-19 09:59:35 +0000 @@ -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); } }