Merge pull request #120 from mul14/add-test-for-input-color-type
Add test for input color type
This commit is contained in:
commit
f8cd022c4f
1 file changed
+11
@@ -468,6 +468,17 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals('<input src="'.$url.'" type="image">', $image);
|
$this->assertEquals('<input src="'.$url.'" type="image">', $image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testFormColor()
|
||||||
|
{
|
||||||
|
$form1 = $this->formBuilder->color('foo');
|
||||||
|
$form2 = $this->formBuilder->color('foo', '#ff0000');
|
||||||
|
$form3 = $this->formBuilder->color('foo', null, ['class' => 'span2']);
|
||||||
|
|
||||||
|
$this->assertEquals('<input name="foo" type="color">', $form1);
|
||||||
|
$this->assertEquals('<input name="foo" type="color" value="#ff0000">', $form2);
|
||||||
|
$this->assertEquals('<input class="span2" name="foo" type="color">', $form3);
|
||||||
|
}
|
||||||
|
|
||||||
protected function setModel(array $data, $object = true)
|
protected function setModel(array $data, $object = true)
|
||||||
{
|
{
|
||||||
if ($object) {
|
if ($object) {
|
||||||
|
|||||||
Reference in new issue
Block a user