$this->
expectException(UnsupportedEncoderInputException::
class);
$encoder =
$this->
getContainer()->
get(JsonEntityEncoder::
class);
$encoder->
encode(new Criteria(),
$this->
getContainer()->
get(ProductDefinition::
class),
$input, SerializationFixture::SALES_CHANNEL_API_BASE_URL, SerializationFixture::API_VERSION
);
} public static function complexStructsProvider(): array
{ return [ [MediaDefinition::
class,
new TestBasicStruct()],
[MediaDefinition::
class,
new TestBasicWithToOneRelationship()],
[MediaDefinition::
class,
new TestCollectionWithToOneRelationship()],
];
} /**
* @dataProvider complexStructsProvider
*/
public function testEncodeComplexStructs(string
$definitionClass, SerializationFixture
$fixture): void
{ /** @var EntityDefinition $definition */
$definition =
$this->
getContainer()->
get($definitionClass);