Skip to content

Commit 217be23

Browse files
minor symfony#17194 [Bridge/Doctrine] Fix test case (nicolas-grekas)
This PR was merged into the 2.8 branch. Discussion ---------- [Bridge/Doctrine] Fix test case | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - The choice_list vs choice_loader change is already applied on 3.0, the `@group legacy` tags a test case that has been already removed in 3.0. @webmozart or anyone else could you please have a quick look here and confirm it's ok? Commits ------- 4ef2c33 [Bridge/Doctrine] Fix test case
2 parents 98f013f + 4ef2c33 commit 217be23

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,15 +1194,18 @@ public function testLoaderCachingWithParameters()
11941194
'property3' => 2,
11951195
));
11961196

1197-
$choiceList1 = $form->get('property1')->getConfig()->getOption('choice_list');
1198-
$choiceList2 = $form->get('property2')->getConfig()->getOption('choice_list');
1199-
$choiceList3 = $form->get('property3')->getConfig()->getOption('choice_list');
1197+
$choiceLoader1 = $form->get('property1')->getConfig()->getOption('choice_loader');
1198+
$choiceLoader2 = $form->get('property2')->getConfig()->getOption('choice_loader');
1199+
$choiceLoader3 = $form->get('property3')->getConfig()->getOption('choice_loader');
12001200

1201-
$this->assertInstanceOf('Symfony\Component\Form\ChoiceList\ChoiceListInterface', $choiceList1);
1202-
$this->assertSame($choiceList1, $choiceList2);
1203-
$this->assertSame($choiceList1, $choiceList3);
1201+
$this->assertInstanceOf('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface', $choiceLoader1);
1202+
$this->assertSame($choiceLoader1, $choiceLoader2);
1203+
$this->assertSame($choiceLoader1, $choiceLoader3);
12041204
}
12051205

1206+
/**
1207+
* @group legacy
1208+
*/
12061209
public function testCacheChoiceLists()
12071210
{
12081211
$entity1 = new SingleIntIdEntity(1, 'Foo');

0 commit comments

Comments
 (0)