public function LegacyProgressHelperTest::testMultiByteSupport in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Helper/LegacyProgressHelperTest.php \Symfony\Component\Console\Tests\Helper\LegacyProgressHelperTest::testMultiByteSupport()
File
- vendor/
symfony/ console/ Tests/ Helper/ LegacyProgressHelperTest.php, line 170
Class
- LegacyProgressHelperTest
- @group legacy
Namespace
Symfony\Component\Console\Tests\HelperCode
public function testMultiByteSupport() {
if (!function_exists('mb_strlen') || false === ($encoding = mb_detect_encoding('■'))) {
$this
->markTestSkipped('The mbstring extension is needed for multi-byte support');
}
$progress = new ProgressHelper();
$progress
->start($output = $this
->getOutputStream());
$progress
->setBarCharacter('■');
$progress
->advance(3);
rewind($output
->getStream());
$this
->assertEquals($this
->generateOutput(' 3 [■■■>------------------------]'), stream_get_contents($output
->getStream()));
}