public function ProgressBarTest::testSetCurrentProgress 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::testSetCurrentProgress()
File
- vendor/
symfony/ console/ Tests/ Helper/ ProgressBarTest.php, line 217
Class
Namespace
Symfony\Component\Console\Tests\HelperCode
public function testSetCurrentProgress() {
$bar = new ProgressBar($output = $this
->getOutputStream(), 50);
$bar
->start();
$bar
->display();
$bar
->advance();
$bar
->setProgress(15);
$bar
->setProgress(25);
rewind($output
->getStream());
$this
->assertEquals($this
->generateOutput(' 0/50 [>---------------------------] 0%') . $this
->generateOutput(' 0/50 [>---------------------------] 0%') . $this
->generateOutput(' 1/50 [>---------------------------] 2%') . $this
->generateOutput(' 15/50 [========>-------------------] 30%') . $this
->generateOutput(' 25/50 [==============>-------------] 50%'), stream_get_contents($output
->getStream()));
}