@@ -982,37 +982,13 @@ public function testLoaderCaching()
982
982
'property3 ' => 2 ,
983
983
));
984
984
985
- $ choiceList1 = $ form ->get ('property1 ' )->getConfig ()->getOption ('choice_list ' );
986
- $ choiceList2 = $ form ->get ('property2 ' )->getConfig ()->getOption ('choice_list ' );
987
- $ choiceList3 = $ form ->get ('property3 ' )->getConfig ()->getOption ('choice_list ' );
985
+ $ choiceLoader1 = $ form ->get ('property1 ' )->getConfig ()->getOption ('choice_loader ' );
986
+ $ choiceLoader2 = $ form ->get ('property2 ' )->getConfig ()->getOption ('choice_loader ' );
987
+ $ choiceLoader3 = $ form ->get ('property3 ' )->getConfig ()->getOption ('choice_loader ' );
988
988
989
- $ this ->assertInstanceOf ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' , $ choiceList1 );
990
- $ this ->assertSame ($ choiceList1 , $ choiceList2 );
991
- $ this ->assertSame ($ choiceList1 , $ choiceList3 );
992
- }
993
-
994
- public function testCacheChoiceLists ()
995
- {
996
- $ entity1 = new SingleIntIdEntity (1 , 'Foo ' );
997
-
998
- $ this ->persist (array ($ entity1 ));
999
-
1000
- $ field1 = $ this ->factory ->createNamed ('name ' , 'Symfony\Bridge\Doctrine\Form\Type\EntityType ' , null , array (
1001
- 'em ' => 'default ' ,
1002
- 'class ' => self ::SINGLE_IDENT_CLASS ,
1003
- 'required ' => false ,
1004
- 'choice_label ' => 'name ' ,
1005
- ));
1006
-
1007
- $ field2 = $ this ->factory ->createNamed ('name ' , 'Symfony\Bridge\Doctrine\Form\Type\EntityType ' , null , array (
1008
- 'em ' => 'default ' ,
1009
- 'class ' => self ::SINGLE_IDENT_CLASS ,
1010
- 'required ' => false ,
1011
- 'choice_label ' => 'name ' ,
1012
- ));
1013
-
1014
- $ this ->assertInstanceOf ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' , $ field1 ->getConfig ()->getOption ('choice_list ' ));
1015
- $ this ->assertSame ($ field1 ->getConfig ()->getOption ('choice_list ' ), $ field2 ->getConfig ()->getOption ('choice_list ' ));
989
+ $ this ->assertInstanceOf ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' , $ choiceLoader1 );
990
+ $ this ->assertSame ($ choiceLoader1 , $ choiceLoader2 );
991
+ $ this ->assertSame ($ choiceLoader1 , $ choiceLoader3 );
1016
992
}
1017
993
1018
994
protected function createRegistryMock ($ name , $ em )
0 commit comments