Update ActiveFieldTest.php
This commit is contained in:
parent
f69779386a
commit
f46bdf72f3
@ -162,6 +162,24 @@ HTML;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
HTML;
|
||||
$this->assertEqualsWithoutLE($expectedHtml, $html);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test checkbox
|
||||
*/
|
||||
public function testCheckboxSwitch()
|
||||
{
|
||||
$html = $this->activeField->checkbox(['switch' => true])->render();
|
||||
|
||||
$expectedHtml = <<<HTML
|
||||
<div class="mb-3 field-dynamicmodel-attributename">
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" name="DynamicModel[attributeName]" value="0"><input type="checkbox" id="dynamicmodel-attributename" class="form-check-input is-invalid" name="DynamicModel[attributeName]" value="1" aria-invalid="true">
|
||||
<label class="form-check-label" for="dynamicmodel-attributename">Attribute Name</label>
|
||||
</div>
|
||||
</div>
|
||||
HTML;
|
||||
$this->assertEqualsWithoutLE($expectedHtml, $html);
|
||||
|
Loading…
Reference in New Issue
Block a user