diff options
-rw-r--r-- | Tests/TestDriver.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Tests/TestDriver.php b/Tests/TestDriver.php index 516ddc2..602b9cf 100644 --- a/Tests/TestDriver.php +++ b/Tests/TestDriver.php @@ -68,6 +68,7 @@ function loadTests($test_dir, $test_names) foreach ($test_names as $filename) { $filename = $test_dir . $filename . '.php'; + if (!global_require_once($filename)) { continue; } @@ -89,13 +90,14 @@ function makeSuite($class_name) { $s->setName($class_name); $s->addTestSuite($class_name); $test = $s; + } + + $tc_array_name = $class_name . '_other'; + if (array_key_exists($tc_array_name, $GLOBALS) && + is_array($GLOBALS[$tc_array_name])) { - $tc_array_name = $class_name . '_other'; - if (array_key_exists($tc_array_name, $GLOBALS) && - is_array($GLOBALS[$tc_array_name])) { - foreach ($GLOBALS[$tc_array_name] as $tc) { - $test->addTestSuite(get_class($tc)); - } + foreach ($GLOBALS[$tc_array_name] as $tc) { + $test->addTestSuite(get_class($tc)); } } |