diff --git a/tests/ActiveFormTest.php b/tests/ActiveFormTest.php index b728143..1fb7942 100644 --- a/tests/ActiveFormTest.php +++ b/tests/ActiveFormTest.php @@ -208,6 +208,63 @@ HTML; $this->assertContainsWithoutLE($expected3, $out); } + public function testFloatingLayout() + { + ActiveForm::$counter = 0; + ob_start(); + $model = new DynamicModel(['attributeName', 'selectName', 'checkboxName']); + $form = ActiveForm::begin([ + 'action' => '/some-action', + 'layout' => ActiveForm::LAYOUT_FLOATING + ]); + echo $form->field($model, 'attributeName'); + echo $form->field($model, 'selectName')->listBox([ + '1' => 'One', + '2' => 'Two', + '3' => 'Three' + ]); + echo $form->field($model, 'checkboxName')->checkbox(); + ActiveForm::end(); + $out = ob_get_clean(); + + $expected = << + + +
+ + +HTML; + $expected2 = << + + + + + +HTML; + $expected3 = << +