TestBasicWithToManyRelationships example

$encoder = $this->getContainer()->get(JsonEntityEncoder::class);
        $encoder->encode(new Criteria()$this->getContainer()->get(ProductDefinition::class)$input, SerializationFixture::API_BASE_URL);
    }

    /** * @return list<array{0: class-string, 1: SerializationFixture}> */
    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 */
    
$encoder = $this->getContainer()->get(JsonApiEncoder::class);
        $encoder->encode(new Criteria()$this->getContainer()->get(ProductDefinition::class)$input, SerializationFixture::API_BASE_URL);
    }

    /** * @return array<array{string, SerializationFixture}> */
    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 */
    
Home | Imprint | This part of the site doesn't use cookies.