File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/Symfony/Component/Form/Tests/Extension/Core/Type Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 20
20
use Symfony \Component \OptionsResolver \Exception \InvalidOptionsException ;
21
21
use Symfony \Component \OptionsResolver \Exception \MissingOptionsException ;
22
22
use Symfony \Contracts \Translation \TranslatableInterface ;
23
+ use Symfony \Contracts \Translation \TranslatorInterface ;
23
24
24
25
class EnumTypeTest extends BaseTypeTestCase
25
26
{
@@ -269,8 +270,12 @@ 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
+
275
+ $ translator = $ this ->createMock (TranslatorInterface::class);
276
+ $ translator ->expects ($ this ->once ())->method ('trans ' );
277
+
278
+ $ view ->children [0 ]->vars ['label ' ]->trans ($ translator );
274
279
}
275
280
276
281
protected function getTestOptions (): array
You can’t perform that action at this time.
0 commit comments