Browse Source

[Form] Added test case for bf2f9d2a028f526cd4c61b870571d07834b59bd0

Bernhard Schussek 14 years ago
parent
commit
c575432790
1 changed files with 16 additions and 0 deletions
  1. 16 0
      tests/Symfony/Tests/Component/Form/AbstractLayoutTest.php

+ 16 - 0
tests/Symfony/Tests/Component/Form/AbstractLayoutTest.php

@@ -939,6 +939,22 @@ abstract class AbstractLayoutTest extends \PHPUnit_Framework_TestCase
         );
     }
 
+    public function testSearch()
+    {
+        $form = $this->factory->createNamed('search', 'na&me', 'foo&bar', array(
+            'property_path' => 'name',
+        ));
+
+        $this->assertWidgetMatchesXpath($form->createView(), array(),
+'/input
+    [@type="search"]
+    [@name="na&me"]
+    [@value="foo&bar"]
+    [not(@maxlength)]
+'
+        );
+    }
+
     public function testTime()
     {
         $form = $this->factory->createNamed('time', 'na&me', '04:05:06', array(