Explorar o código

[Form] added some unit tests

hlecorche %!s(int64=13) %!d(string=hai) anos
pai
achega
38f64a1bd9
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      tests/Symfony/Tests/Component/Form/AbstractLayoutTest.php

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

@@ -1491,11 +1491,13 @@ abstract class AbstractLayoutTest extends \PHPUnit_Framework_TestCase
     {
         $form = $this->factory->createNamed('textarea', 'na&me', 'foo&bar', array(
             'property_path' => 'name',
+            'pattern' => 'foo',
         ));
 
         $this->assertWidgetMatchesXpath($form->createView(), array(),
 '/textarea
     [@name="na&me"]
+    [not(@pattern)]
     [.="foo&bar"]
 '
         );