Youshido\Tests\Parser\ParserTest::testTypedFragment PHP Method

testTypedFragment() public method

public testTypedFragment ( )
    public function testTypedFragment()
    {
        $parser = new Parser();
        $parsedStructure = $parser->parse('
            {
                test: test {
                    name,
                    ... on UnionType {
                        unionName
                    }
                }
            }
        ');
        $this->assertEquals($parsedStructure, ['queries' => [new Query('test', 'test', [], [new Field('name', null, [], new Location(4, 21)), new TypedFragmentReference('UnionType', [new Field('unionName', null, [], new Location(6, 25))], new Location(5, 28))], new Location(3, 23))], 'mutations' => [], 'fragments' => [], 'fragmentReferences' => [], 'variables' => [], 'variableReferences' => []]);
    }