diff options
author | Frédéric Guillot <fred@kanboard.net> | 2017-12-15 11:24:35 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2017-12-15 11:55:42 -0800 |
commit | a93b8e10f5954be0853eec693c13e84c4bd9e6f2 (patch) | |
tree | eda5de9494b819235616e8623bb3393e9cc373af /vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php | |
parent | 2c72a283f2d51034f85f4e2ca8b194d304a3c433 (diff) |
Kanboard requires at least PHP 5.6 now
Diffstat (limited to 'vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php')
-rw-r--r-- | vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php b/vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php index 19262526..c85018de 100644 --- a/vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php +++ b/vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php @@ -2,13 +2,14 @@ namespace Symfony\Component\Console\Tests\Helper; +use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Helper\ProgressIndicator; use Symfony\Component\Console\Output\StreamOutput; /** * @group time-sensitive */ -class ProgressIndicatorTest extends \PHPUnit_Framework_TestCase +class ProgressIndicatorTest extends TestCase { public function testDefaultIndicator() { @@ -44,11 +45,11 @@ class ProgressIndicatorTest extends \PHPUnit_Framework_TestCase $this->generateOutput(' \\ Starting...'). $this->generateOutput(' \\ Advancing...'). $this->generateOutput(' | Advancing...'). - $this->generateOutput(' | Done... '). + $this->generateOutput(' | Done...'). PHP_EOL. $this->generateOutput(' - Starting Again...'). $this->generateOutput(' \\ Starting Again...'). - $this->generateOutput(' \\ Done Again... '). + $this->generateOutput(' \\ Done Again...'). PHP_EOL, stream_get_contents($output->getStream()) ); @@ -70,8 +71,8 @@ class ProgressIndicatorTest extends \PHPUnit_Framework_TestCase $this->assertEquals( ' Starting...'.PHP_EOL. - ' Midway... '.PHP_EOL. - ' Done... '.PHP_EOL.PHP_EOL, + ' Midway...'.PHP_EOL. + ' Done...'.PHP_EOL.PHP_EOL, stream_get_contents($output->getStream()) ); } @@ -177,6 +178,6 @@ class ProgressIndicatorTest extends \PHPUnit_Framework_TestCase { $count = substr_count($expected, "\n"); - return "\x0D".($count ? sprintf("\033[%dA", $count) : '').$expected; + return "\x0D\x1B[2K".($count ? sprintf("\033[%dA", $count) : '').$expected; } } |