yiisoft / yii-bootstrap5

Yii Framework Bootstrap 5 support
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
63 stars 19 forks source link

Failing phpunit tests #4

Closed Mister-42 closed 4 years ago

Mister-42 commented 4 years ago
There were 3 errors:

1) Yiisoft\Yii\Bootstrap5\Tests\ButtonGroupTest::testContainerOptions
Undefined index: options

/dev/yii-bootstrap5/src/ButtonGroup.php:85
/dev/yii-bootstrap5/src/ButtonGroup.php:54
/dev/yii-bootstrap5/vendor/yiisoft/widget/src/Widget.php:106
/dev/yii-bootstrap5/tests/ButtonGroupTest.php:30

2) Yiisoft\Yii\Bootstrap5\Tests\ButtonToolbarTest::testContainerOptions
Undefined index: options

/dev/yii-bootstrap5/src/ButtonGroup.php:85
/dev/yii-bootstrap5/src/ButtonGroup.php:54
/dev/yii-bootstrap5/vendor/yiisoft/widget/src/Widget.php:106
/dev/yii-bootstrap5/tests/ButtonToolbarTest.php:37

3) Yiisoft\Yii\Bootstrap5\Tests\ButtonToolbarTest::testAdditionalContent
Undefined index: options

/dev/yii-bootstrap5/src/ButtonGroup.php:85
/dev/yii-bootstrap5/src/ButtonGroup.php:54
/dev/yii-bootstrap5/src/ButtonToolbar.php:83
/dev/yii-bootstrap5/src/ButtonToolbar.php:62
/dev/yii-bootstrap5/vendor/yiisoft/widget/src/Widget.php:106
/dev/yii-bootstrap5/tests/ButtonToolbarTest.php:96

--

There were 4 failures:

1) Yiisoft\Yii\Bootstrap5\Tests\TabsTest::testDisabled
Failed asserting that '<ul id="w0-tabs" class="nav nav-tabs" role="tablist"><li class="nav-item"><a class="nav-link disabled" href="#w0-tabs-tab0" tabindex="-1" aria-disabled="true">Page1</a></li>\n
<li class="nav-item"><a class="nav-link active" href="#w0-tabs-tab1">Page2</a></li>\n
<li class="nav-item"><a class="nav-link disabled" href="#w0-tabs-tab2" tabindex="-1" aria-disabled="true">DisabledPage</a></li>\n
<li class="dropdown nav-item"><a class="dropdown-toggle nav-link" href="#" data-toggle="dropdown">Dropdown1</a><div id="w1-dropdown" class="dropdown-menu"><a class="dropdown-item" href="#w0-tabs-dd3-tab0">Page2</a>\n
<a class="dropdown-item disabled" href="#w0-tabs-dd3-tab1" tabindex="-1" aria-disabled="true">DisabledItem</a>\n
<a class="dropdown-item" href="#w0-tabs-dd3-tab2">Page3</a>\n
<a class="dropdown-item" href="/other/dropdown/route">External Link</a>\n
<a class="dropdown-item disabled" href="/other/dropdown/route" tabindex="-1" aria-disabled="true">Disabled External Link</a></div></li></ul>\n
<div class="tab-content"><div id="w0-tabs-tab0" class="tab-pane">Page1</div>\n
<div id="w0-tabs-tab1" class="tab-pane active">Page2</div>\n
<div id="w0-tabs-tab2" class="tab-pane">Disabled Page Content</div>\n
<div id="w0-tabs-dd3-tab0" class="tab-pane">Page2</div>\n
<div id="w0-tabs-dd3-tab1" class="tab-pane">Disabled Item Content</div>\n
<div id="w0-tabs-dd3-tab2" class="tab-pane">Page3</div></div>' contains "<li class="nav-item"><a class="nav-link disabled" href="#w0-tabs-tab0" data-toggle="tab" role="tab" aria-controls="w0-tabs-tab0" tabindex="-1" aria-disabled="true">Page1</a></li>".

/dev/yii-bootstrap5/tests/TabsTest.php:189

2) Yiisoft\Yii\Bootstrap5\Tests\TabsTest::testActivateFirstVisibleTab
Failed asserting that '<ul id="mytab" class="nav nav-tabs" role="tablist"><li class="nav-item"><a class="nav-link disabled" href="#mytab-tab1" tabindex="-1" aria-disabled="true">Tab 2</a></li>\n
<li class="nav-item"><a class="nav-link active" href="#mytab-tab2">Tab 3</a></li>\n
<li class="nav-item"><a class="nav-link" href="#mytab-tab3">Tab 4</a></li></ul>\n
<div class="tab-content"><div id="mytab-tab1" class="tab-pane">some content</div>\n
<div id="mytab-tab2" class="tab-pane active">some content</div>\n
<div id="mytab-tab3" class="tab-pane">some content</div></div>' contains "<li class="nav-item"><a class="nav-link active" href="#mytab-tab2" data-toggle="tab" role="tab" aria-controls="mytab-tab2" aria-selected="true">Tab 3</a></li>".

/dev/yii-bootstrap5/tests/TabsTest.php:294

3) Yiisoft\Yii\Bootstrap5\Tests\TabsTest::testActivateTab
Failed asserting that '<ul id="mytab" class="nav nav-tabs" role="tablist"><li class="nav-item"><a class="nav-link" href="#mytab-tab1">Tab 2</a></li>\n
<li class="nav-item"><a class="nav-link active" href="#mytab-tab2">Tab 3</a></li>\n
<li class="nav-item"><a class="nav-link" href="#mytab-tab3">Tab 4</a></li></ul>\n
<div class="tab-content"><div id="mytab-tab1" class="tab-pane">some content</div>\n
<div id="mytab-tab2" class="tab-pane active">some content</div>\n
<div id="mytab-tab3" class="tab-pane">some content</div></div>' contains "<li class="nav-item"><a class="nav-link active" href="#mytab-tab2" data-toggle="tab" role="tab" aria-controls="mytab-tab2" aria-selected="true">Tab 3</a></li>".

/dev/yii-bootstrap5/tests/TabsTest.php:328

4) Yiisoft\Yii\Bootstrap5\Tests\TabsTest::testIdRendering
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'<ul id="w0-tabs" class="nav nav-tabs" role="tablist"><li class="nav-item"><a class="nav-link active" href="#pane1" data-toggle="tab" role="tab" aria-controls="pane1" aria-selected="true">Tab 1</a></li>\n
-<li class="nav-item"><a class="nav-link" href="#w0-tabs-tab1" data-toggle="tab" role="tab" aria-controls="w0-tabs-tab1" aria-selected="false">Tab 2</a></li></ul>\n
+'<ul id="w0-tabs" class="nav nav-tabs" role="tablist"><li class="nav-item"><a class="nav-link active" href="#pane1">Tab 1</a></li>\n
+<li class="nav-item"><a class="nav-link" href="#w0-tabs-tab1">Tab 2</a></li></ul>\n
 <div class="tab-content"><div id="pane1" class="tab-pane active"><div>Content 1</div></div>\n
 <div id="w0-tabs-tab1" class="tab-pane"><div>Content 2</div></div></div>'

/dev/yii-bootstrap5/tests/TestCase.php:71
/dev/yii-bootstrap5/tests/TabsTest.php:390