CountrySerializer example

private EntityRepository $countryRepository;

    private CountrySerializer $serializer;

    private string $countryId = '67d89afb684e44eeacd71ba1f59a5ae1';

    protected function setUp(): void
    {
        $this->countryRepository = $this->getContainer()->get('country.repository');
        $serializerRegistry = $this->getContainer()->get(SerializerRegistry::class);

        $this->serializer = new CountrySerializer($this->countryRepository);
        $this->serializer->setRegistry($serializerRegistry);
    }

    public function testSimple(): void
    {
        $this->createCountry();

        $config = new Config([][][]);
        $country = [
            'iso' => 'XX',
        ];

        
Home | Imprint | This part of the site doesn't use cookies.