File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1898,4 +1898,18 @@ public function testStartTagWithExtraAttributes()
1898
1898
1899
1899
$ this ->assertSame ('<form method="get" action="http://example.com/directory" class="foobar"> ' , $ html );
1900
1900
}
1901
+
1902
+ public function testTranslatedAttributes ()
1903
+ {
1904
+ $ view = $ this ->factory ->createNamedBuilder ('name ' , 'form ' )
1905
+ ->add ('firstName ' , 'text ' , array ('attr ' => array ('title ' => 'Foo ' )))
1906
+ ->add ('lastName ' , 'text ' , array ('attr ' => array ('placeholder ' => 'Bar ' )))
1907
+ ->getForm ()
1908
+ ->createView ();
1909
+
1910
+ $ html = $ this ->renderForm ($ view );
1911
+
1912
+ $ this ->assertMatchesXpath ($ html , '/form//input[@title="[trans]Foo[/trans]"] ' );
1913
+ $ this ->assertMatchesXpath ($ html , '/form//input[@placeholder="[trans]Bar[/trans]"] ' );
1914
+ }
1901
1915
}
You can’t perform that action at this time.
0 commit comments