summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2008-06-05 18:00:34 +0000
committertailor <cygnus@janrain.com>2008-06-05 18:00:34 +0000
commit160392b196414ce4a8d152b65c4aae75a8bc2aca (patch)
tree4f9030e5991e3b3c1e6ec957b9f2a59d69d59d7b /Tests
parentffae436ba5a516ee037b09e105ce5cbdd2c55e08 (diff)
downloadphp-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]
Diffstat (limited to 'Tests')
-rw-r--r--Tests/TestDriver.php14
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));
}
}