You are here

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

File

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

Class

ProgressBarTest

Namespace

Symfony\Component\Console\Tests\Helper

Code

public function testMultilineFormat() {
  $bar = new ProgressBar($output = $this
    ->getOutputStream(), 3);
  $bar
    ->setFormat("%bar%\nfoobar");
  $bar
    ->start();
  $bar
    ->advance();
  $bar
    ->clear();
  $bar
    ->finish();
  rewind($output
    ->getStream());
  $this
    ->assertEquals($this
    ->generateOutput(">---------------------------\nfoobar") . $this
    ->generateOutput("=========>------------------\nfoobar                      ") . $this
    ->generateOutput("                            \n                            ") . $this
    ->generateOutput("============================\nfoobar                      "), stream_get_contents($output
    ->getStream()));
}