|
@@ -1119,6 +1119,23 @@ abstract class AbstractLayoutTest extends \PHPUnit_Framework_TestCase
|
|
|
[@type="url"]
|
|
|
[@name="na&me"]
|
|
|
[@value="http://www.google.com?foo1=bar1&foo2=bar2"]
|
|
|
+'
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ public function testCollectionPrototype()
|
|
|
+ {
|
|
|
+ $form = $this->factory->createNamedBuilder('form', 'na&me', array('items' => array('one', 'two', 'three')))
|
|
|
+ ->add('items', 'collection', array('allow_add' => true))
|
|
|
+ ->getForm()
|
|
|
+ ->createView();
|
|
|
+
|
|
|
+ $html = $this->renderWidget($form);
|
|
|
+
|
|
|
+ $this->assertMatchesXpath($html,
|
|
|
+'//script
|
|
|
+ [@id="na&me_items_prototype"]
|
|
|
+ [@type="text/html"]
|
|
|
'
|
|
|
);
|
|
|
}
|