only in patch2: unchanged: --- a/modules/simpletest/simpletest.module +++ b/modules/simpletest/simpletest.module @@ -370,11 +370,25 @@ function simpletest_test_get_all() { // If this test class requires a non-existing module, skip it. if (!empty($info['dependencies'])) { + + // Searching for an item that does not exist returns NULL. + // Set a custom error handler so we can ignore the file not found error. + set_error_handler(function($error_level, $message, $filename, $line, $context) { + // Skip error handling if this is a "file not found" error. + if (strstr($message, 'is missing from the file system:')) { + return; + } + _drupal_error_handler($error_level, $message, $filename, $line, $context); + }); + foreach ($info['dependencies'] as $module) { if (!drupal_get_filename('module', $module)) { continue 2; } } + + // Restore the original error handler. + restore_error_handler(); } $groups[$info['group']][$class] = $info;