Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Merge [4647].

  • Loading branch information...
commit 024fa153a8084084e390a467b579542c87e5f39c 1 parent 8d52382
@sebastianbergmann authored
Showing with 12 additions and 6 deletions.
  1. +3 −1 PHPUnit/TextUI/Command.php
  2. +9 −5 PHPUnit/Util/Configuration.php
View
4 PHPUnit/TextUI/Command.php
@@ -644,7 +644,9 @@ protected static function handleArguments()
}
if (!isset($arguments['test'])) {
- $testSuite = $configuration->getTestSuiteConfiguration();
+ $testSuite = $configuration->getTestSuiteConfiguration(
+ $arguments['syntaxCheck']
+ );
if ($testSuite !== NULL) {
$arguments['test'] = $testSuite;
View
14 PHPUnit/Util/Configuration.php
@@ -689,10 +689,11 @@ public function getSeleniumBrowserConfiguration()
/**
* Returns the test suite configuration.
*
+ * @param boolean $syntaxCheck
* @return PHPUnit_Framework_TestSuite
* @since Method available since Release 3.2.1
*/
- public function getTestSuiteConfiguration()
+ public function getTestSuiteConfiguration($syntaxCheck = TRUE)
{
$testSuiteNodes = $this->xpath->query('testsuites/testsuite');
@@ -700,7 +701,9 @@ public function getTestSuiteConfiguration()
$suite = new PHPUnit_Framework_TestSuite;
foreach ($testSuiteNodes as $testSuiteNode) {
- $suite->addTestSuite($this->getTestSuite($testSuiteNode));
+ $suite->addTestSuite(
+ $this->getTestSuite($testSuiteNode), $syntaxCheck
+ );
}
return $suite;
@@ -709,10 +712,11 @@ public function getTestSuiteConfiguration()
/**
* @param DOMElement $testSuiteNode
+ * @param boolean $syntaxCheck
* @return PHPUnit_Framework_TestSuite
* @since Method available since Release 3.4.0
*/
- protected function getTestSuite(DOMElement $testSuiteNode)
+ protected function getTestSuite(DOMElement $testSuiteNode, $syntaxCheck)
{
if ($testSuiteNode->hasAttribute('name')) {
$suite = new PHPUnit_Framework_TestSuite(
@@ -733,11 +737,11 @@ protected function getTestSuite(DOMElement $testSuiteNode)
array((string)$directoryNode->nodeValue), $suffix
);
- $suite->addTestFiles($testCollector->collectTests());
+ $suite->addTestFiles($testCollector->collectTests(), $syntaxCheck);
}
foreach ($testSuiteNode->getElementsByTagName('file') as $fileNode) {
- $suite->addTestFile((string)$fileNode->nodeValue);
+ $suite->addTestFile((string)$fileNode->nodeValue, $syntaxCheck);
}
return $suite;
Please sign in to comment.
Something went wrong with that request. Please try again.