Allow select options to have attributes

This commit is contained in:
Marek Skiba committed 2017-01-28 14:44:59 +01:00
1 parent 7570f25d58
commit f113066717
2 files changed
+40 -18

No files matched your search

+11
View File
@@ -314,6 +314,17 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
$select,
'<select name="encoded_html"><option value="no_break_space">&amp;nbsp;</option><option value="ampersand">&amp;amp;</option><option value="lower_than">&amp;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()