TestCollectionWithSelfReference example



    /** * @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 */
    public function testEncodeComplexStructs(string $definitionClass, SerializationFixture $fixture): void
    {
        


    /** * @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 */
    public function testEncodeComplexStructs(string $definitionClass, SerializationFixture $fixture): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.