Allow select options to have attributes
This commit is contained in:
1 parent
7570f25d58
commit
f113066717
2 files changed
+40
-18
No files matched your search
@@ -314,6 +314,17 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
||||
$select,
|
||||
'<select name="encoded_html"><option value="no_break_space">&nbsp;</option><option value="ampersand">&amp;</option><option value="lower_than">&lt;</option></select>'
|
||||
);
|
||||
|
||||
$select = $this->formBuilder->select(
|
||||
'size',
|
||||
['L' => 'Large', 'S' => 'Small'],
|
||||
null,
|
||||
[],
|
||||
['L' => ['data-foo' => 'bar', 'disabled']]
|
||||
);
|
||||
$this->assertEquals($select,
|
||||
'<select name="size"><option value="L" data-foo="bar" disabled="disabled">Large</option><option value="S">Small</option></select>');
|
||||
|
||||
}
|
||||
|
||||
public function testFormSelectRepopulation()
|
||||
|
||||
Reference in new issue
Block a user