You are here

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

File

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

Class

ProgressBarTest

Namespace

Symfony\Component\Console\Tests\Helper

Code

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