public function ProgressBarTest::testPercentNotHundredBeforeComplete 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::testPercentNotHundredBeforeComplete()
File
- vendor/
symfony/ console/ Tests/ Helper/ ProgressBarTest.php, line 306
Class
Namespace
Symfony\Component\Console\Tests\HelperCode
public function testPercentNotHundredBeforeComplete() {
$bar = new ProgressBar($output = $this
->getOutputStream(), 200);
$bar
->start();
$bar
->display();
$bar
->advance(199);
$bar
->advance();
rewind($output
->getStream());
$this
->assertEquals($this
->generateOutput(' 0/200 [>---------------------------] 0%') . $this
->generateOutput(' 0/200 [>---------------------------] 0%') . $this
->generateOutput(' 199/200 [===========================>] 99%') . $this
->generateOutput(' 200/200 [============================] 100%'), stream_get_contents($output
->getStream()));
}