'My Company', 'brandUrl' => '/', 'options' => [ 'class' => 'navbar-inverse navbar-static-top navbar-frontend', ], ]); $expected = <<
My Company
EXPECTED; $this->assertEqualsWithoutLE($expected, $out); } public function testBrandImage() { $out = NavBar::widget([ 'brandImage' => '/images/test.jpg', 'brandUrl' => '/', ]); $this->assertContains('', $out); } public function testBrandLink() { $out = NavBar::widget([ 'brandLabel' => 'Yii Framework', 'brandUrl' => false, ]); $this->assertContains('Yii Framework', $out); } public function testBrandSpan() { $out = NavBar::widget([ 'brandLabel' => 'Yii Framework', 'brandUrl' => null, ]); $this->assertContains('Yii Framework', $out); } /** */ public function testNavAndForm() { NavBar::$counter = 0; ob_start(); NavBar::begin([ 'brandLabel' => 'My Company', 'brandUrl' => '/', 'options' => [ ], ]); echo Nav::widget([ 'options' => [ 'class' => ['mr-auto'] ], 'items' => [ ['label' => 'Home', 'url' => '#'], ['label' => 'Link', 'url' => '#'], ['label' => 'Dropdown', 'items' => [ ['label' => 'Action', 'url' => '#'], ['label' => 'Another action', 'url' => '#'], '-', ['label' => 'Something else here', 'url' => '#'], ]] ] ]); echo << HTML; NavBar::end(); $out = ob_get_clean(); $expected = << EXPECTED; $this->assertEqualsWithoutLE($expected, $out); } }