Possibility of boolean value for selected option in select field (#487)
* Validation in select field for boolean value of selected option * Adjusts * Update FormBuilder.php Adjustments * Test and adjusment on PHPDoc
This commit is contained in:
1 parent
360cb180f7
commit
050af9862b
2 files changed
+10
-2
No files matched your search
@@ -464,6 +464,12 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
||||
'<select name="countries"><option value="1" selected="selected">L</option><option value="2">M</option></select>',
|
||||
$result
|
||||
);
|
||||
|
||||
$select = $this->formBuilder->select('avc', [1 => 'Yes', 0 => 'No'], true, ['placeholder' => 'Select']);
|
||||
$this->assertEquals(
|
||||
'<select name="avc"><option value="" hidden="hidden">Select</option><option value="1" selected>Yes</option><option value="0" >No</option></select>',
|
||||
$select
|
||||
);
|
||||
}
|
||||
|
||||
public function testSelectCollection()
|
||||
|
||||
Reference in new issue
Block a user