'Progress', 'percent' => 25, 'barOptions' => ['class' => 'bg-warning'] ]); $expected = <<
HTML; $this->assertEqualsWithoutLE($expected, $out); } public function testRender() { Progress::$counter = 0; $out = Progress::widget([ 'bars' => [ ['label' => 'Progress', 'percent' => 25] ] ]); $expected = << HTML; $this->assertEqualsWithoutLE($expected, $out); } /** */ public function testMultiple() { Progress::$counter = 0; $out = Progress::widget([ 'bars' => [ ['label' => '', 'percent' => 15], ['label' => '', 'percent' => 30, 'options' => ['class' => ['bg-success']]], ['label' => '', 'percent' => 20, 'options' => ['class' => ['bg-info']]] ] ]); $expected = << HTML; $this->assertEqualsWithoutLE($expected, $out); } /** * @see https://github.com/yiisoft/yii2-bootstrap5/issues/121 */ public function testRussianLocaleRendering() { $this->mockWebApplication([ 'language' => 'ru-RU', 'sourceLanguage' => 'en-US', ]); Progress::$counter = 0; $out = Progress::widget([ 'bars' => [ ['label' => 'Progress', 'percent' => 25] ] ]); $expected = << HTML; $this->assertEqualsWithoutLE($expected, $out); } }