Permalink
Browse files

Fix bug #51.

  • Loading branch information...
1 parent 55c4b87 commit 8b1211e58ec55c9aac048252f35a859d432238ab @sebastianbergmann committed Sep 29, 2006
Showing with 14 additions and 8 deletions.
  1. +14 −8 PHPUnit/Framework/TestSuite.php
@@ -471,16 +471,22 @@ public function run(PHPUnit_Framework_TestResult $result = NULL, $filter = FALSE
break;
}
- $name = $test->getName();
- $runTest = TRUE;
+ if ($test instanceof PHPUnit_Framework_TestSuite) {
+ $test->run($result, $filter);
+ } else {
+ $runTest = TRUE;
- if ($name !== NULL && !$test instanceof PHPUnit_Framework_TestSuite &&
- $filter !== FALSE && preg_match($filter, $name) == 0) {
- $runTest = FALSE;
- }
+ if ($filter !== FALSE ) {
+ $name = $test->getName();
+
+ if ($name !== NULL && preg_match($filter, $name) == 0) {
+ $runTest = FALSE;
+ }
+ }
- if ($runTest) {
- $this->runTest($test, $result);
+ if ($runTest) {
+ $this->runTest($test, $result);
+ }
}
}

0 comments on commit 8b1211e

Please sign in to comment.