GraphQL\Tests\Language\SchemaParserTest::testSimpleTypeInheritingInterface PHP Method

testSimpleTypeInheritingInterface() public method

    public function testSimpleTypeInheritingInterface()
    {
        $body = 'type Hello implements World { }';
        $loc = function ($start, $end) {
            return TestUtils::locArray($start, $end);
        };
        $doc = Parser::parse($body);
        $expected = ['kind' => NodeKind::DOCUMENT, 'definitions' => [['kind' => NodeKind::OBJECT_TYPE_DEFINITION, 'name' => $this->nameNode('Hello', $loc(5, 10)), 'interfaces' => [$this->typeNode('World', $loc(22, 27))], 'directives' => [], 'fields' => [], 'loc' => $loc(0, 31)]], 'loc' => $loc(0, 31)];
        $this->assertEquals($expected, TestUtils::nodeToArray($doc));
    }