'checkbox', 'model' => new ToggleButtonGroupTestModel(), 'attribute' => 'value', 'items' => [ '1' => 'item 1', '2' => 'item 2', ], ]); $expectedHtml = <<
HTML; $this->assertEqualsWithoutLE($expectedHtml, $html); } public function testRadio() { ToggleButtonGroup::$counter = 0; $html = ToggleButtonGroup::widget([ 'type' => 'radio', 'model' => new ToggleButtonGroupTestModel(), 'attribute' => 'value', 'items' => [ '1' => 'item 1', '2' => 'item 2', ], ]); $expectedHtml = << HTML; $this->assertEqualsWithoutLE($expectedHtml, $html); } } class ToggleButtonGroupTestModel extends Model { public $value; }