File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/Symfony/Component/Form/Tests/Extension/Core/Type Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 19
19
use Symfony \Component \Form \Tests \Fixtures \TranslatableTextAlign ;
20
20
use Symfony \Component \OptionsResolver \Exception \InvalidOptionsException ;
21
21
use Symfony \Component \OptionsResolver \Exception \MissingOptionsException ;
22
+ use Symfony \Component \Translation \IdentityTranslator ;
22
23
use Symfony \Contracts \Translation \TranslatableInterface ;
23
24
24
25
class EnumTypeTest extends BaseTypeTestCase
@@ -269,8 +270,8 @@ public function testChoiceLabelTranslatable()
269
270
270
271
$ view = $ form ->createView ();
271
272
272
- $ this ->assertInstanceOf (\UnitEnum::class, $ view ->children [0 ]->vars ['label ' ]);
273
273
$ this ->assertInstanceOf (TranslatableInterface::class, $ view ->children [0 ]->vars ['label ' ]);
274
+ $ this ->assertEquals ('Left ' , $ view ->children [0 ]->vars ['label ' ]->trans (new IdentityTranslator ()));
274
275
}
275
276
276
277
protected function getTestOptions (): array
You can’t perform that action at this time.
0 commit comments