public function ProgressBarTest::testCustomizations in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Helper/ProgressBarTest.php \Symfony\Component\Console\Tests\Helper\ProgressBarTest::testCustomizations()
File
- vendor/
symfony/ console/ Tests/ Helper/ ProgressBarTest.php, line 107
Class
Namespace
Symfony\Component\Console\Tests\HelperCode
public function testCustomizations() {
$bar = new ProgressBar($output = $this
->getOutputStream(), 10);
$bar
->setBarWidth(10);
$bar
->setBarCharacter('_');
$bar
->setEmptyBarCharacter(' ');
$bar
->setProgressCharacter('/');
$bar
->setFormat(' %current%/%max% [%bar%] %percent:3s%%');
$bar
->start();
$bar
->advance();
rewind($output
->getStream());
$this
->assertEquals($this
->generateOutput(' 0/10 [/ ] 0%') . $this
->generateOutput(' 1/10 [_/ ] 10%'), stream_get_contents($output
->getStream()));
}