Skip to content
Browse files

- Merge [5037].

  • Loading branch information...
1 parent 08587e8 commit 8c37fcb29916ee600fbc7d5dac30f5f9c3aeab1c @sebastianbergmann committed Jul 30, 2009
View
4 PHPUnit/Tests/TextUI/dataprovider-log-xml-isolation.phpt
@@ -1,10 +1,10 @@
--TEST--
-phpunit --process-isolation --log-xml php://stdout DataProviderTest ../_files/DataProviderTest.php
+phpunit --process-isolation --log-junit php://stdout DataProviderTest ../_files/DataProviderTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = '--process-isolation';
-$_SERVER['argv'][3] = '--log-xml';
+$_SERVER['argv'][3] = '--log-junit';
$_SERVER['argv'][4] = 'php://stdout';
$_SERVER['argv'][5] = 'DataProviderTest';
$_SERVER['argv'][6] = dirname(dirname(__FILE__)) . '/_files/DataProviderTest.php';
View
4 PHPUnit/Tests/TextUI/dataprovider-log-xml.phpt
@@ -1,9 +1,9 @@
--TEST--
-phpunit --log-xml php://stdout DataProviderTest ../_files/DataProviderTest.php
+phpunit --log-junit php://stdout DataProviderTest ../_files/DataProviderTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';
-$_SERVER['argv'][2] = '--log-xml';
+$_SERVER['argv'][2] = '--log-junit';
$_SERVER['argv'][3] = 'php://stdout';
$_SERVER['argv'][4] = 'DataProviderTest';
$_SERVER['argv'][5] = dirname(dirname(__FILE__)) . '/_files/DataProviderTest.php';
View
4 PHPUnit/Tests/TextUI/help.phpt
@@ -11,9 +11,9 @@ PHPUnit %s by Sebastian Bergmann.
Usage: phpunit [switches] UnitTest [UnitTest.php]
phpunit [switches] <directory>
- --log-json <file> Log test execution in JSON format.
+ --log-junit <file> Log test execution in JUnit XML format to file.
--log-tap <file> Log test execution in TAP format to file.
- --log-xml <file> Log test execution in XML format to file.
+ --log-json <file> Log test execution in JSON format.
--coverage-html <dir> Generate code coverage report in HTML format.
--coverage-clover <file> Write code coverage data in Clover XML format.
View
4 PHPUnit/Tests/TextUI/help2.phpt
@@ -14,9 +14,9 @@ PHPUnit %s by Sebastian Bergmann.
Usage: phpunit [switches] UnitTest [UnitTest.php]
phpunit [switches] <directory>
- --log-json <file> Log test execution in JSON format.
+ --log-junit <file> Log test execution in JUnit XML format to file.
--log-tap <file> Log test execution in TAP format to file.
- --log-xml <file> Log test execution in XML format to file.
+ --log-json <file> Log test execution in JSON format.
--coverage-html <dir> Generate code coverage report in HTML format.
--coverage-clover <file> Write code coverage data in Clover XML format.
View
4 PHPUnit/Tests/TextUI/log-xml.phpt
@@ -1,9 +1,9 @@
--TEST--
-phpunit --log-xml php://stdout BankAccountTest ../../Samples/BankAccount/BankAccountTest.php
+phpunit --log-junit php://stdout BankAccountTest ../../Samples/BankAccount/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';
-$_SERVER['argv'][2] = '--log-xml';
+$_SERVER['argv'][2] = '--log-junit';
$_SERVER['argv'][3] = 'php://stdout';
$_SERVER['argv'][4] = 'BankAccountTest';
$_SERVER['argv'][5] = '../Samples/BankAccount/BankAccountTest.php';
View
2 PHPUnit/Tests/Util/ConfigurationTest.php
@@ -220,7 +220,7 @@ public function testGetLoggingConfiguration()
'pmd-xml' => '/tmp/pmd.xml',
'tap' => '/tmp/logfile.tap',
'logIncompleteSkipped' => FALSE,
- 'test-xml' => '/tmp/logfile.xml',
+ 'junit' => '/tmp/logfile.xml',
'story-html' => '/tmp/story.html',
'story-text' => '/tmp/story.txt',
'testdox-html' => '/tmp/testdox.html',
View
2 PHPUnit/Tests/_files/configuration.xml
@@ -74,7 +74,7 @@
<log type="plain" target="/tmp/logfile.txt"/>
<log type="pmd-xml" target="/tmp/pmd.xml" cpdMinLines="5" cpdMinMatches="70"/>
<log type="tap" target="/tmp/logfile.tap"/>
- <log type="test-xml" target="/tmp/logfile.xml" logIncompleteSkipped="false"/>
+ <log type="junit" target="/tmp/logfile.xml" logIncompleteSkipped="false"/>
<log type="story-html" target="/tmp/story.html"/>
<log type="story-text" target="/tmp/story.txt"/>
<log type="testdox-html" target="/tmp/testdox.html"/>
View
22 PHPUnit/TextUI/Command.php
@@ -105,6 +105,7 @@ class PHPUnit_TextUI_Command
'loader=' => NULL,
'log-graphviz=' => NULL,
'log-json=' => NULL,
+ 'log-junit=' => NULL,
'log-metrics=' => NULL,
'log-pmd=' => NULL,
'log-tap=' => NULL,
@@ -408,6 +409,18 @@ protected function handleArguments(array $argv)
}
break;
+ case '--log-xml': {
+ $this->showMessage(
+ 'The --log-xml option is deprecated, please use --log-junit instead.',
+ FALSE
+ );
+ }
+
+ case '--log-junit': {
+ $this->arguments['junitLogfile'] = $option[1];
+ }
+ break;
+
case '--log-graphviz': {
$this->showMessage(
'The --log-graphviz functionality is deprecated and will be removed in the future.',
@@ -427,11 +440,6 @@ protected function handleArguments(array $argv)
}
break;
- case '--log-xml': {
- $this->arguments['xmlLogfile'] = $option[1];
- }
- break;
-
case '--log-pmd': {
$this->showMessage(
'The --log-pmd functionality is deprecated and will be removed in the future.',
@@ -879,9 +887,9 @@ protected function showHelp()
Usage: phpunit [switches] UnitTest [UnitTest.php]
phpunit [switches] <directory>
- --log-json <file> Log test execution in JSON format.
+ --log-junit <file> Log test execution in JUnit XML format to file.
--log-tap <file> Log test execution in TAP format to file.
- --log-xml <file> Log test execution in XML format to file.
+ --log-json <file> Log test execution in JSON format.
--coverage-html <dir> Generate code coverage report in HTML format.
--coverage-clover <file> Write code coverage data in Clover XML format.
View
12 PHPUnit/TextUI/TestRunner.php
@@ -306,12 +306,12 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
);
}
- if (isset($arguments['xmlLogfile'])) {
- require_once 'PHPUnit/Util/Log/XML.php';
+ if (isset($arguments['junitLogfile'])) {
+ require_once 'PHPUnit/Util/Log/JUnit.php';
$result->addListener(
- new PHPUnit_Util_Log_XML(
- $arguments['xmlLogfile'], $arguments['logIncompleteSkipped']
+ new PHPUnit_Util_Log_JUnit(
+ $arguments['junitLogfile'], $arguments['logIncompleteSkipped']
)
);
}
@@ -766,8 +766,8 @@ protected function handleConfiguration(array &$arguments)
$arguments['tapLogfile'] = $loggingConfiguration['tap'];
}
- if (isset($loggingConfiguration['test-xml']) && !isset($arguments['xmlLogfile'])) {
- $arguments['xmlLogfile'] = $loggingConfiguration['test-xml'];
+ if (isset($loggingConfiguration['junit']) && !isset($arguments['junitLogfile'])) {
+ $arguments['junitLogfile'] = $loggingConfiguration['junit'];
if (isset($loggingConfiguration['logIncompleteSkipped']) && !isset($arguments['logIncompleteSkipped'])) {
$arguments['logIncompleteSkipped'] = $loggingConfiguration['logIncompleteSkipped'];
View
4 PHPUnit/Util/Configuration.php
@@ -132,7 +132,7 @@
* <log type="plain" target="/tmp/logfile.txt"/>
* <log type="pmd-xml" target="/tmp/pmd.xml" cpdMinLines="5" cpdMinMatches="70"/>
* <log type="tap" target="/tmp/logfile.tap"/>
- * <log type="test-xml" target="/tmp/logfile.xml" logIncompleteSkipped="false"/>
+ * <log type="junit" target="/tmp/logfile.xml" logIncompleteSkipped="false"/>
* <log type="story-html" target="/tmp/story.html"/>
* <log type="story-text" target="/tmp/story.txt"/>
* <log type="testdox-html" target="/tmp/testdox.html"/>
@@ -420,7 +420,7 @@ public function getLoggingConfiguration()
}
}
- else if ($type == 'test-xml') {
+ else if ($type == 'junit') {
if ($log->hasAttribute('logIncompleteSkipped')) {
$result['logIncompleteSkipped'] = $this->getBoolean(
(string)$log->getAttribute('logIncompleteSkipped'),
View
2 PHPUnit/Util/Log/XML.php → PHPUnit/Util/Log/JUnit.php
@@ -66,7 +66,7 @@
* @link http://www.phpunit.de/
* @since Class available since Release 2.1.0
*/
-class PHPUnit_Util_Log_XML extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener
+class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener
{
/**
* @var DOMDocument
View
6 package.xml
@@ -1262,6 +1262,9 @@
<file baseinstalldir="/" name="JSON.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
+ <file baseinstalldir="/" name="JUnit.php" role="php">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
<file baseinstalldir="/" name="Metrics.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
@@ -1274,9 +1277,6 @@
<file baseinstalldir="/" name="TAP.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file baseinstalldir="/" name="XML.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
</dir>
<dir name="Metrics">
<file baseinstalldir="/" name="Class.php" role="php">

0 comments on commit 8c37fcb

Please sign in to comment.
Something went wrong with that request. Please try again.