You are here

public function LegacyProgressHelperTest::testCustomizations in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Helper/LegacyProgressHelperTest.php \Symfony\Component\Console\Tests\Helper\LegacyProgressHelperTest::testCustomizations()

File

vendor/symfony/console/Tests/Helper/LegacyProgressHelperTest.php, line 66

Class

LegacyProgressHelperTest
@group legacy

Namespace

Symfony\Component\Console\Tests\Helper

Code

public function testCustomizations() {
  $progress = new ProgressHelper();
  $progress
    ->setBarWidth(10);
  $progress
    ->setBarCharacter('_');
  $progress
    ->setEmptyBarCharacter(' ');
  $progress
    ->setProgressCharacter('/');
  $progress
    ->setFormat(' %current%/%max% [%bar%] %percent%%');
  $progress
    ->start($output = $this
    ->getOutputStream(), 10);
  $progress
    ->advance();
  rewind($output
    ->getStream());
  $this
    ->assertEquals($this
    ->generateOutput('  1/10 [_/        ]  10%'), stream_get_contents($output
    ->getStream()));
}