Skip to content

Commit

Permalink
Remove TAP (Test Anything Protocol) test listener (--tap and --log-ta…
Browse files Browse the repository at this point in the history
…p commandline options)
  • Loading branch information
sebastianbergmann committed Nov 22, 2016
1 parent 1f82346 commit 7a5b62c
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 375 deletions.
2 changes: 2 additions & 0 deletions ChangeLog-6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ All notable changes of the PHPUnit 6.0 release series are documented in this fil
* Removed the `PHPUnit_Extensions_RepeatedTest` class
* Removed the `PHPUnit_Extensions_TestDecorator` class
* Removed the `PHPUnit_Extensions_TicketListener` class
* Removed the `PHPUnit_Util_Log_TAP` class
* Removed the `PHPUnit_Util_Test::getTickets()` method
* Removed the `checkForUnintentionallyCoveredCode` configuration setting (deprecated in PHPUnit 5.2)
* Removed the `--self-update` and `--self-upgrade` commandline options
* Removed the `--tap` and `--log-tap` commandline options
* Removed the `--report-useless-tests` commandline option
* Removed the `--no-globals-backup` commandline option
* PHPUnit is no longer supported on PHP 5.6
Expand Down
8 changes: 0 additions & 8 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,6 @@
</fileset>
</copy>

<copy file="${basedir}/vendor/symfony/yaml/LICENSE" tofile="${basedir}/build/phar/symfony/LICENSE"/>
<copy todir="${basedir}/build/phar/symfony">
<fileset dir="${basedir}/vendor/symfony">
<include name="**/*.php" />
<exclude name="**/Tests/**" />
</fileset>
</copy>

<copy todir="${basedir}/build/phar/dbunit">
<fileset dir="${basedir}/vendor/phpunit/dbunit/src">
<include name="**/*.php" />
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"phpunit/php-timer": "^1.0.6",
"phpunit/phpunit-mock-objects": "^3.2",
"phpspec/prophecy": "^1.3.1",
"symfony/yaml": "~2.1|~3.0",
"sebastian/comparator": "~1.2.2",
"sebastian/diff": "~1.2",
"sebastian/environment": "^1.3 || ^2.0",
Expand Down
12 changes: 0 additions & 12 deletions src/TextUI/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class PHPUnit_TextUI_Command
'loader=' => null,
'log-json=' => null,
'log-junit=' => null,
'log-tap=' => null,
'log-teamcity=' => null,
'no-configuration' => null,
'no-coverage' => null,
Expand All @@ -85,7 +84,6 @@ class PHPUnit_TextUI_Command
'strict-coverage' => null,
'disable-coverage-ignore' => null,
'strict-global-state' => null,
'tap' => null,
'teamcity' => null,
'testdox' => null,
'testdox-group=' => null,
Expand Down Expand Up @@ -449,10 +447,6 @@ protected function handleArguments(array $argv)
$this->arguments['junitLogfile'] = $option[1];
break;

case '--log-tap':
$this->arguments['tapLogfile'] = $option[1];
break;

case '--log-teamcity':
$this->arguments['teamcityLogfile'] = $option[1];
break;
Expand Down Expand Up @@ -501,10 +495,6 @@ protected function handleArguments(array $argv)
$this->arguments['failOnRisky'] = true;
break;

case '--tap':
$this->arguments['printer'] = 'PHPUnit_Util_Log_TAP';
break;

case '--teamcity':
$this->arguments['printer'] = 'PHPUnit_Util_Log_TeamCity';
break;
Expand Down Expand Up @@ -937,7 +927,6 @@ protected function showHelp()
Logging Options:
--log-junit <file> Log test execution in JUnit XML format to file.
--log-tap <file> Log test execution in TAP format to file.
--log-teamcity <file> Log test execution in TeamCity format to file.
--log-json <file> Log test execution in JSON format.
--testdox-html <file> Write agile documentation in HTML format to file.
Expand Down Expand Up @@ -987,7 +976,6 @@ protected function showHelp()
--loader <loader> TestSuiteLoader implementation to use.
--repeat <times> Runs the test(s) repeatedly.
--tap Report test execution progress in TAP format.
--teamcity Report test execution progress in TeamCity format.
--testdox Report test execution progress in TestDox format.
--testdox-group Only include tests from the specified group(s).
Expand Down
53 changes: 19 additions & 34 deletions src/TextUI/TestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,31 +261,29 @@ class_exists($arguments['printer'], false)) {
}
}

if (!$this->printer instanceof PHPUnit_Util_Log_TAP) {
$this->printer->write(
PHPUnit_Runner_Version::getVersionString() . "\n"
);
$this->printer->write(
PHPUnit_Runner_Version::getVersionString() . "\n"
);

self::$versionStringPrinted = true;
self::$versionStringPrinted = true;

if ($arguments['verbose']) {
$runtime = $this->runtime->getNameWithVersion();
if ($arguments['verbose']) {
$runtime = $this->runtime->getNameWithVersion();

if ($this->runtime->hasXdebug()) {
$runtime .= sprintf(
' with Xdebug %s',
phpversion('xdebug')
);
}
if ($this->runtime->hasXdebug()) {
$runtime .= sprintf(
' with Xdebug %s',
phpversion('xdebug')
);
}

$this->writeMessage('Runtime', $runtime);
$this->writeMessage('Runtime', $runtime);

if (isset($arguments['configuration'])) {
$this->writeMessage(
'Configuration',
$arguments['configuration']->getFilename()
);
}
if (isset($arguments['configuration'])) {
$this->writeMessage(
'Configuration',
$arguments['configuration']->getFilename()
);
}
}

Expand Down Expand Up @@ -365,9 +363,7 @@ class_exists($arguments['printer'], false)) {
}
}

if (!$this->printer instanceof PHPUnit_Util_Log_TAP) {
$this->printer->write("\n");
}
$this->printer->write("\n");

if ($codeCoverageReports > 0) {
$codeCoverage = new CodeCoverage(
Expand Down Expand Up @@ -424,12 +420,6 @@ class_exists($arguments['printer'], false)) {
);
}

if (isset($arguments['tapLogfile'])) {
$result->addListener(
new PHPUnit_Util_Log_TAP($arguments['tapLogfile'])
);
}

if (isset($arguments['teamcityLogfile'])) {
$result->addListener(
new PHPUnit_Util_Log_TeamCity($arguments['teamcityLogfile'])
Expand Down Expand Up @@ -974,11 +964,6 @@ protected function handleConfiguration(array &$arguments)
);
}

if (isset($loggingConfiguration['tap']) &&
!isset($arguments['tapLogfile'])) {
$arguments['tapLogfile'] = $loggingConfiguration['tap'];
}

if (isset($loggingConfiguration['teamcity']) &&
!isset($arguments['teamcityLogfile'])) {
$arguments['teamcityLogfile'] = $loggingConfiguration['teamcity'];
Expand Down
1 change: 0 additions & 1 deletion src/Util/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
* <log type="coverage-crap4j" target="/tmp/crap.xml" threshold="30"/>
* <log type="json" target="/tmp/logfile.json"/>
* <log type="plain" target="/tmp/logfile.txt"/>
* <log type="tap" target="/tmp/logfile.tap"/>
* <log type="teamcity" target="/tmp/logfile.txt"/>
* <log type="junit" target="/tmp/logfile.xml"/>
* <log type="testdox-html" target="/tmp/testdox.html"/>
Expand Down
Loading

0 comments on commit 7a5b62c

Please sign in to comment.