Skip to content

Commit

Permalink
Closes #1737
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 3, 2015
1 parent 06b645c commit 00b9b5d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog-4.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Merged [#1725](https://github.com/sebastianbergmann/phpunit/pull/1725): Update phpDox XSD URI
* Merged [#1735](https://github.com/sebastianbergmann/phpunit/pull/1735): Mute `chdir()` failures in XInclude handling of XML configuration file
* Merged [#1736](https://github.com/sebastianbergmann/phpunit/pull/1736): Verify that phar file can be overwritten before attempting self update
* Fixed [#1737](https://github.com/sebastianbergmann/phpunit/issues/1737): Confusing output from `--testdox` for empty test class

## PHPUnit 4.6.9

Expand Down
19 changes: 19 additions & 0 deletions src/Util/TestDox/ResultPrinter/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,23 @@
*/
class PHPUnit_Util_TestDox_ResultPrinter_Text extends PHPUnit_Util_TestDox_ResultPrinter
{
/**
* @var bool
*/
private $isWarning = false;

/**
* Handler for 'start class' event.
*
* @param string $name
*/
protected function startClass($name)
{
if ($name == 'PHPUnit_Framework_Warning') {
$this->isWarning = true;
return;
}

$this->write($this->currentTestClassPrettified . "\n");
}

Expand All @@ -39,6 +49,10 @@ protected function startClass($name)
*/
protected function onTest($name, $success = true)
{
if ($this->isWarning) {
return;
}

if ($success) {
$this->write(' [x] ');
} else {
Expand All @@ -55,6 +69,11 @@ protected function onTest($name, $success = true)
*/
protected function endClass($name)
{
if ($this->isWarning) {
$this->isWarning = false;
return;
}

$this->write("\n");
}
}

0 comments on commit 00b9b5d

Please sign in to comment.