You are here

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

File

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

Class

ProgressBarTest

Namespace

Symfony\Component\Console\Tests\Helper

Code

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