@@ -742,7 +742,7 @@ public function testSerializerEnabled()
742
742
743
743
$ argument = $ container ->getDefinition ('serializer.mapping.chain_loader ' )->getArgument (0 );
744
744
745
- $ this ->assertCount (1 , $ argument );
745
+ $ this ->assertCount (2 , $ argument );
746
746
$ this ->assertEquals ('Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader ' , $ argument [0 ]->getClass ());
747
747
$ this ->assertNull ($ container ->getDefinition ('serializer.mapping.class_metadata_factory ' )->getArgument (1 ));
748
748
$ this ->assertEquals (new Reference ('serializer.name_converter.camel_case_to_snake_case ' ), $ container ->getDefinition ('serializer.normalizer.object ' )->getArgument (1 ));
@@ -839,11 +839,13 @@ public function testSerializerCacheDisabled()
839
839
public function testSerializerMapping ()
840
840
{
841
841
$ container = $ this ->createContainerFromFile ('serializer_mapping ' , array ('kernel.bundles_metadata ' => array ('TestBundle ' => array ('namespace ' => 'Symfony \\Bundle \\FrameworkBundle \\Tests ' , 'path ' => __DIR__ .'/Fixtures/TestBundle ' ))));
842
+ $ rootDir = $ container ->getParameter ('kernel.root_dir ' );
842
843
$ configDir = __DIR__ .'/Fixtures/TestBundle/Resources/config ' ;
843
844
$ expectedLoaders = array (
844
845
new Definition (AnnotationLoader::class, array (new Reference ('annotation_reader ' ))),
845
846
new Definition (XmlFileLoader::class, array ($ configDir .'/serialization.xml ' )),
846
847
new Definition (YamlFileLoader::class, array ($ configDir .'/serialization.yml ' )),
848
+ new Definition (YamlFileLoader::class, array ($ rootDir .'/Resources/config/serialization/foo.yml ' )),
847
849
new Definition (XmlFileLoader::class, array ($ configDir .'/serializer_mapping/files/foo.xml ' )),
848
850
new Definition (YamlFileLoader::class, array ($ configDir .'/serializer_mapping/files/foo.yml ' )),
849
851
new Definition (YamlFileLoader::class, array ($ configDir .'/serializer_mapping/serialization.yml ' )),
@@ -855,7 +857,10 @@ public function testSerializerMapping()
855
857
}
856
858
857
859
$ loaders = $ container ->getDefinition ('serializer.mapping.chain_loader ' )->getArgument (0 );
858
- $ this ->assertEquals (sort ($ expectedLoaders ), sort ($ loaders ));
860
+
861
+ sort ($ expectedLoaders );
862
+ sort ($ loaders );
863
+ $ this ->assertEquals ($ expectedLoaders , $ loaders );
859
864
}
860
865
861
866
public function testAssetHelperWhenAssetsAreEnabled ()
0 commit comments