Skip to content

Commit e0cb8a3

Browse files
committed
minor #17632 [FrameworkBundle] Test that ObjectNormalizer is registered (dunglas)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] Test that ObjectNormalizer is registered | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 129b140 [FrameworkBundle] Test that ObjectNormalizer is registered
2 parents 10a3eaa + 0d0e111 commit e0cb8a3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
1919
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
2020
use Symfony\Component\DependencyInjection\Reference;
21+
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
2122
use Symfony\Component\Validator\Validation;
2223

2324
abstract class FrameworkExtensionTest extends TestCase
@@ -442,6 +443,17 @@ public function testSerializerEnabled()
442443
$this->assertTrue($container->has('serializer'));
443444
}
444445

446+
public function testObjectNormalizerRegistered()
447+
{
448+
$container = $this->createContainerFromFile('full');
449+
450+
$definition = $container->getDefinition('serializer.normalizer.object');
451+
$tag = $definition->getTag('serializer.normalizer');
452+
453+
$this->assertEquals(ObjectNormalizer::class, $definition->getClass());
454+
$this->assertEquals(-1000, $tag[0]['priority']);
455+
}
456+
445457
public function testAssetHelperWhenAssetsAreEnabled()
446458
{
447459
$container = $this->createContainerFromFile('full');

0 commit comments

Comments
 (0)