Skip to content

Commit 420b861

Browse files
committed
[Form] Improve test
1 parent c8316f4 commit 420b861

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\Form\Tests\Fixtures\TranslatableTextAlign;
2020
use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
2121
use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
22+
use Symfony\Component\Translation\IdentityTranslator;
2223
use Symfony\Contracts\Translation\TranslatableInterface;
2324

2425
class EnumTypeTest extends BaseTypeTestCase
@@ -269,8 +270,8 @@ public function testChoiceLabelTranslatable()
269270

270271
$view = $form->createView();
271272

272-
$this->assertInstanceOf(\UnitEnum::class, $view->children[0]->vars['label']);
273273
$this->assertInstanceOf(TranslatableInterface::class, $view->children[0]->vars['label']);
274+
$this->assertEquals('Left', $view->children[0]->vars['label']->trans(new IdentityTranslator()));
274275
}
275276

276277
protected function getTestOptions(): array

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy