You are here

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

File

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

Class

ProgressBarTest

Namespace

Symfony\Component\Console\Tests\Helper

Code

public function testStartWithMax() {
  $bar = new ProgressBar($output = $this
    ->getOutputStream());
  $bar
    ->setFormat('%current%/%max% [%bar%]');
  $bar
    ->start(50);
  $bar
    ->advance();
  rewind($output
    ->getStream());
  $this
    ->assertEquals($this
    ->generateOutput(' 0/50 [>---------------------------]') . $this
    ->generateOutput(' 1/50 [>---------------------------]'), stream_get_contents($output
    ->getStream()));
}