Skip to content

Commit b3a0478

Browse files
committed
fix tests
1 parent e1f9a1f commit b3a0478

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/Functional/SerializerTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public function testNormalizersAndEncodersUseDefaultContextConfigOption()
4444
$kernel = static::bootKernel(['test_case' => 'Serializer', 'root_config' => 'default_context.yaml']);
4545

4646
foreach ($kernel->normalizersAndEncoders as $normalizerOrEncoderId) {
47+
if (!static::getContainer()->has($normalizerOrEncoderId)) {
48+
continue;
49+
}
50+
4751
$normalizerOrEncoder = static::getContainer()->get($normalizerOrEncoderId);
4852

4953
$reflectionObject = new \ReflectionObject($normalizerOrEncoder);
@@ -68,7 +72,7 @@ class SerializerKernel extends AppKernel implements CompilerPassInterface
6872
'serializer.normalizer.property.alias', // Special case as this normalizer isn't tagged
6973
];
7074

71-
public function process(ContainerBuilder $container)
75+
public function process(ContainerBuilder $container): void
7276
{
7377
$services = array_merge(
7478
$container->findTaggedServiceIds('serializer.normalizer'),

0 commit comments

Comments
 (0)