- Add unit test for check rendering item container close #124
@ -7,6 +7,7 @@ Yii Framework 2 bootstrap extension Change Log
- Bug #68: Fixed `yii\bootstrap\Nav` handling empty items (freezy-sk)
- Bug #81: Fixed `yii\bootstrap\ActiveField::radioList()` and `yii\bootstrap\ActiveField::checkboxList()` ignore `itemOptions` (mikehaertl)
- Bug #98: Fixed `yii\bootstrap\ButtonDropdown` setting `href` attribute for non `a` tags (13nightevil)
- Bug #124: Fixed `yii\bootstrap\Tabs` to use `tag` configuration option for item container (arturf)
- Enh #45: Added support for Bootstrap checkbox/radio toggle buttons (RomeroMsk, klimov-paul)
2.0.5 September 23, 2015
@ -194,7 +194,8 @@ class Tabs extends Widget
}
if ($this->renderTabContent) {
$panes[] = Html::tag('div', isset($item['content']) ? $item['content'] : '', $options);
$tag = ArrayHelper::remove($options, 'tag', 'div');
$panes[] = Html::tag($tag, isset($item['content']) ? $item['content'] : '', $options);
@ -106,4 +106,24 @@ class TabsTest extends TestCase
$this->assertNotContains('InvisibleItem', $html);
$this->assertNotContains('Invisible Item Content', $html);
public function testItem()
{
$checkTag = 'article';
$out = Tabs::widget([
'items' => [
[
'label' => 'Page1', 'content' => 'Page1',
],
'label' => 'Page2', 'content' => 'Page2',
'itemOptions' => ['tag' => $checkTag],
'renderTabContent' => true,
]);
$this->assertContains('<' . $checkTag, $out);