Skip to content

Commit

Permalink
Fixed issue with PHPUnit 5.* when it crashed with maxColumn equal to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
rudowastaken committed Aug 23, 2016
1 parent f620c10 commit 0a15837
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/Printer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use PHPUnit_Framework_AssertionFailedError;
use PHPUnit_Framework_Test;
use PHPUnit_Framework_TestCase;
use PHPUnit_Framework_TestSuite;
use PHPUnit_TextUI_ResultPrinter;
use PHPUnit_Util_Test;

Expand Down Expand Up @@ -39,19 +38,9 @@ protected function writeProgress($progress)
$progress = static::$symbols[$progress];
}

return parent::writeProgress(sprintf('%s %s', $progress, $this->testRow));
}

/**
* {@inheritdoc}
*/
public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
{
if ($this->numTests == -1) {
$this->numTests = count($suite);
$this->numTestsWidth = strlen((string) $this->numTests);
$this->maxColumn = 0;
}
$this->write(sprintf('%s %s', $progress, $this->testRow));
$this->column++;
$this->numTestsRun++;
}

/**
Expand Down

0 comments on commit 0a15837

Please sign in to comment.