Skip to content

Commit

Permalink
- Implemented #21271399: Deprecate the --phpunit-xml log option
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelpichler committed Nov 22, 2011
1 parent 6503233 commit 658c25c
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 600 deletions.
11 changes: 10 additions & 1 deletion src/main/php/PHP/Depend/Log/Phpunit/Xml.php
Expand Up @@ -47,6 +47,8 @@
* @deprecated Since release 0.10.5, please use the summary logger
*/

// @codeCoverageIgnoreStart

/**
* This logger provides a xml log file, that is compatible with the files
* generated by the <a href="http://www.Phpunit.de">PHPUnit</a> --log-metrics
Expand Down Expand Up @@ -210,6 +212,11 @@ public function log(PHP_Depend_Metrics_AnalyzerI $analyzer)
*/
public function close()
{
trigger_error(
'The --phpunit-xml log option is deprecated.',
E_USER_DEPRECATED
);

if ($this->_logFile === null) {
throw new PHP_Depend_Log_NoLogOutputException($this);
}
Expand Down Expand Up @@ -442,4 +449,6 @@ private function _applyPHPUnitTranslationTable(array $metrics)
}
return $metrics;
}
}
}

// @codeCoverageIgnoreEnd
5 changes: 5 additions & 0 deletions src/main/php/PHP/Depend/TextUI/Command.php
Expand Up @@ -620,6 +620,11 @@ protected function collectAnalyzerOptions()
*/
private function _printOption($option, $message, $length)
{
// Ignore the phpunit xml option
if (0 === strpos($option, '--phpunit-xml=')) {
return;
}

// Calculate the max message length
$mlength = 77 - $length;

Expand Down
4 changes: 1 addition & 3 deletions src/test/php/PHP/Depend/Log/AllTests.php
Expand Up @@ -50,7 +50,6 @@
require_once dirname(__FILE__) . '/Jdepend/ChartTest.php';
require_once dirname(__FILE__) . '/Jdepend/XmlTest.php';
require_once dirname(__FILE__) . '/Overview/PyramidTest.php';
require_once dirname(__FILE__) . '/Phpunit/XmlTest.php';
require_once dirname(__FILE__) . '/Summary/XmlTest.php';

/**
Expand Down Expand Up @@ -79,9 +78,8 @@ public static function suite()
$suite->addTestSuite('PHP_Depend_Log_Jdepend_ChartTest');
$suite->addTestSuite('PHP_Depend_Log_Jdepend_XmlTest');
$suite->addTestSuite('PHP_Depend_Log_Overview_PyramidTest');
$suite->addTestSuite('PHP_Depend_Log_Phpunit_XmlTest');
$suite->addTestSuite('PHP_Depend_Log_Summary_XmlTest');

return $suite;
}
}
}
228 changes: 0 additions & 228 deletions src/test/php/PHP/Depend/Log/Phpunit/XmlTest.php

This file was deleted.

28 changes: 0 additions & 28 deletions src/test/php/PHP/Depend/Log/Phpunit/_expected/phpunit-log.xml

This file was deleted.

This file was deleted.

0 comments on commit 658c25c

Please sign in to comment.