You are here

public function ProgressBarTest::testWithoutMax 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::testWithoutMax()

File

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

Class

ProgressBarTest

Namespace

Symfony\Component\Console\Tests\Helper

Code

public function testWithoutMax() {
  $output = $this
    ->getOutputStream();
  $bar = new ProgressBar($output);
  $bar
    ->start();
  $bar
    ->advance();
  $bar
    ->advance();
  $bar
    ->advance();
  $bar
    ->finish();
  rewind($output
    ->getStream());
  $this
    ->assertEquals(rtrim($this
    ->generateOutput('    0 [>---------------------------]')) . rtrim($this
    ->generateOutput('    1 [->--------------------------]')) . rtrim($this
    ->generateOutput('    2 [-->-------------------------]')) . rtrim($this
    ->generateOutput('    3 [--->------------------------]')) . rtrim($this
    ->generateOutput('    3 [============================]')), stream_get_contents($output
    ->getStream()));
}