Initial commit,修正

This commit is contained in:
2025-07-13 19:37:38 +08:00
parent 38ce288e27
commit 65bbd06981
12384 changed files with 3985464 additions and 8 deletions
@@ -0,0 +1,34 @@
<?php
namespace yiiunit\extensions\bootstrap5;
use yii\bootstrap5\Button;
use yii\bootstrap5\ButtonGroup;
/**
* @group bootstrap5
*/
class ButtonGroupTest extends TestCase
{
public function testContainerOptions()
{
ButtonGroup::$counter = 0;
$out = ButtonGroup::widget([
'buttons' => [
['label' => 'button-A'],
['label' => 'button-B', 'visible' => true],
['label' => 'button-C', 'visible' => false],
Button::widget(['label' => 'button-D']),
],
]);
$expected = <<<HTML
<div id="w1" class="btn-group" role="group"><button type="button" id="w2" class="btn">button-A</button>
<button type="button" id="w3" class="btn">button-B</button>
<button id="w0" class="btn">button-D</button></div>
HTML;
$this->assertEqualsWithoutLE($expected, $out);
}
}