diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php new file mode 100644 index 000000000..c725599b7 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php @@ -0,0 +1,48 @@ +normalizer = self::$container->get(NormalizerInterface::class); + } + + public function testNormalization() + { + $o = new Origin(); + + $normalized = $this->normalizer->normalize( + $o, + 'json', + ['groups' => ['read']] + ); + + $this->assertIsArray($normalized); + $this->assertArrayHasKey('type', $normalized); + $this->assertEquals('origin', $normalized['type']); + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php index 743cce736..e71e0bf51 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php @@ -60,7 +60,7 @@ final class AccompanyingPeriodWorkDocGenNormalizerTest extends KernelTestCase } } - public function testNormlalize() + public function testNormalize() { $work = new AccompanyingPeriodWork(); $work diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php new file mode 100644 index 000000000..3e56cf74b --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php @@ -0,0 +1,48 @@ +normalizer = self::$container->get(NormalizerInterface::class); + } + + public function testNormalization() + { + $si = new SocialIssue(); + + $normalized = $this->normalizer->normalize( + $si, + 'json', + ['groups' => ['read']] + ); + + $this->assertIsArray($normalized); + $this->assertArrayHasKey('type', $normalized); + $this->assertEquals('social_issue', $normalized['type']); + } +}