mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-18 08:14:24 +00:00
41 lines
1003 B
PHP
41 lines
1003 B
PHP
<?php
|
|
|
|
/**
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Serializer\Normalizer;
|
|
|
|
use Chill\PersonBundle\Entity\Person;
|
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
|
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
|
|
|
/**
|
|
* @internal
|
|
* @coversNothing
|
|
*/
|
|
final class PersonJsonNormalizerTest extends KernelTestCase
|
|
{
|
|
private NormalizerInterface $normalizer;
|
|
|
|
protected function setUp()
|
|
{
|
|
self::bootKernel();
|
|
$this->normalizer = self::$container->get(NormalizerInterface::class);
|
|
}
|
|
|
|
public function testNormalization()
|
|
{
|
|
$person = new Person();
|
|
$result = $this->normalizer->normalize($person, 'json', [AbstractNormalizer::GROUPS => ['read']]);
|
|
|
|
$this->assertIsArray($result);
|
|
}
|
|
}
|