diff options
author | tailor <cygnus@janrain.com> | 2008-06-05 18:00:34 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2008-06-05 18:00:34 +0000 |
commit | 160392b196414ce4a8d152b65c4aae75a8bc2aca (patch) | |
tree | 4f9030e5991e3b3c1e6ec957b9f2a59d69d59d7b | |
parent | ffae436ba5a516ee037b09e105ce5cbdd2c55e08 (diff) | |
download | php-openid-160392b196414ce4a8d152b65c4aae75a8bc2aca.zip php-openid-160392b196414ce4a8d152b65c4aae75a8bc2aca.tar.gz php-openid-160392b196414ce4a8d152b65c4aae75a8bc2aca.tar.bz2 |
[project @ TestDriver.php: load "_other" tests regardless of primary test class type]
-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)); } } |