Skip to content

Commit

Permalink
Fix TRAC-1075.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jul 6, 2010
1 parent e8fba95 commit a68030e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
18 changes: 15 additions & 3 deletions PHPUnit/Util/Configuration.php
Expand Up @@ -734,6 +734,12 @@ protected function getTestSuite(DOMElement $testSuiteNode, $syntaxCheck)
}

foreach ($testSuiteNode->getElementsByTagName('directory') as $directoryNode) {
$directory = (string)$directoryNode->nodeValue;

if (empty($directory)) {
continue;
}

if ($directoryNode->hasAttribute('prefix')) {
$prefix = (string)$directoryNode->getAttribute('prefix');
} else {
Expand All @@ -747,14 +753,20 @@ protected function getTestSuite(DOMElement $testSuiteNode, $syntaxCheck)
}

$testCollector = new PHPUnit_Runner_IncludePathTestCollector(
array((string)$directoryNode->nodeValue), $suffix, $prefix
array($directory), $suffix, $prefix
);

$suite->addTestFiles($testCollector->collectTests(), $syntaxCheck);
}

foreach ($testSuiteNode->getElementsByTagName('file') as $fileNode) {
$suite->addTestFile((string)$fileNode->nodeValue, $syntaxCheck);
$file = (string)$fileNode->nodeValue;

if (empty($file)) {
continue;
}

$suite->addTestFile($file, $syntaxCheck);
}

return $suite;
Expand Down Expand Up @@ -834,4 +846,4 @@ protected function readFilterFiles($query)
return $files;
}
}
?>
?>
1 change: 1 addition & 0 deletions README.markdown
Expand Up @@ -9,6 +9,7 @@ PHPUnit 3.4.15
* Fixed TRAC-907: Commands `captureEntirePageScreenshotToString` and `captureScreenshotToString` do not work for Selenium extension.
* Fixed TRAC-939: Missing test classes when using process isolation.
* Fixed TRAC-1024: `setUpBeforeClass()` does not work in process isolation.
* Fixed TRAC-1075: Empty `<file></file>` in `phpunit.xml` causes errors.

PHPUnit 3.4.14
--------------
Expand Down

0 comments on commit a68030e

Please sign in to comment.