You are here

public function ProgressBarTest::testNonDecoratedOutputWithClear in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Helper/ProgressBarTest.php \Symfony\Component\Console\Tests\Helper\ProgressBarTest::testNonDecoratedOutputWithClear()

File

vendor/symfony/console/Tests/Helper/ProgressBarTest.php, line 352

Class

ProgressBarTest

Namespace

Symfony\Component\Console\Tests\Helper

Code

public function testNonDecoratedOutputWithClear() {
  $bar = new ProgressBar($output = $this
    ->getOutputStream(false), 50);
  $bar
    ->start();
  $bar
    ->setProgress(25);
  $bar
    ->clear();
  $bar
    ->setProgress(50);
  $bar
    ->finish();
  rewind($output
    ->getStream());
  $this
    ->assertEquals('  0/50 [>---------------------------]   0%' . PHP_EOL . ' 25/50 [==============>-------------]  50%' . PHP_EOL . ' 50/50 [============================] 100%', stream_get_contents($output
    ->getStream()));
}