BusinessEventEncoder example

$stored = [
            'mail' => [
                'recipients' => ['firstName' => 'name'],
            ],
            'array' => ['test'],
            'string' => 'test',
        ];

        $entityEncoder = $this->createMock(JsonEntityEncoder::class);
        $definitionRegistry = $this->createMock(DefinitionInstanceRegistry::class);
        $businessEventEncoder = new BusinessEventEncoder($entityEncoder$definitionRegistry);

        $data = $businessEventEncoder->encodeData($data$stored);

        static::assertIsArray($data['tax']);
        static::assertIsArray($data['mail']);
        static::assertIsArray($data['array']);
        static::assertIsString($data['string']);
    }
}
Home | Imprint | This part of the site doesn't use cookies.