Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3341558

Browse files
grasmashfabpot
authored andcommitted
Add test.
1 parent f0671ef commit 3341558

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Tests/Helper/ProgressBarTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,21 @@ public function testSetFormat()
899899
);
900900
}
901901

902+
public function testUnicode()
903+
{
904+
$bar = new ProgressBar($output = $this->getOutputStream(), 10, 0);
905+
ProgressBar::setFormatDefinition('test', '%current%/%max% [%bar%] %percent:3s%% %message% Fruitcake marzipan toffee. Cupcake gummi bears tart dessert ice cream chupa chups cupcake chocolate bar sesame snaps. Croissant halvah cookie jujubes powder macaroon. Fruitcake bear claw bonbon jelly beans oat cake pie muffin Fruitcake marzipan toffee.');
906+
$bar->setFormat('test');
907+
$bar->setProgressCharacter('💧');
908+
$bar->start();
909+
rewind($output->getStream());
910+
$this->assertStringContainsString(
911+
' 0/10 [💧] 0%',
912+
stream_get_contents($output->getStream())
913+
);
914+
$bar->finish();
915+
}
916+
902917
/**
903918
* @dataProvider provideFormat
904919
*/

0 commit comments

Comments
 (0)