TestMainResourceShouldNotBeInIncluded example


    public static function complexStructsProvider(): array
    {
        return [
            [MediaDefinition::classnew TestBasicStruct()],
            [UserDefinition::classnew TestBasicWithToManyRelationships()],
            [MediaDefinition::classnew TestBasicWithToOneRelationship()],
            [MediaFolderDefinition::classnew TestCollectionWithSelfReference()],
            [MediaDefinition::classnew TestCollectionWithToOneRelationship()],
            [RuleDefinition::classnew TestInternalFieldsAreFiltered()],
            [UserDefinition::classnew TestMainResourceShouldNotBeInIncluded()],
        ];
    }

    /** * @dataProvider complexStructsProvider */
    public function testEncodeComplexStructs(string $definitionClass, SerializationFixture $fixture): void
    {
        /** @var EntityDefinition $definition */
        $definition = $this->getContainer()->get($definitionClass);
        $encoder = $this->getContainer()->get(JsonApiEncoder::class);
        

    public static function complexStructsProvider(): array
    {
        return [
            [MediaDefinition::classnew TestBasicStruct()],
            [UserDefinition::classnew TestBasicWithToManyRelationships()],
            [MediaDefinition::classnew TestBasicWithToOneRelationship()],
            [MediaFolderDefinition::classnew TestCollectionWithSelfReference()],
            [MediaDefinition::classnew TestCollectionWithToOneRelationship()],
            [RuleDefinition::classnew TestInternalFieldsAreFiltered()],
            [UserDefinition::classnew TestMainResourceShouldNotBeInIncluded()],
        ];
    }

    /** * @dataProvider complexStructsProvider */
    public function testEncodeComplexStructs(string $definitionClass, SerializationFixture $fixture): void
    {
        /** @var EntityDefinition $definition */
        $definition = $this->getContainer()->get($definitionClass);
        $encoder = $this->getContainer()->get(JsonEntityEncoder::class);
        
Home | Imprint | This part of the site doesn't use cookies.