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

testScalar() public method

public testScalar ( )
    public function testScalar()
    {
        $body = 'scalar Hello';
        $doc = Parser::parse($body);
        $loc = function ($start, $end) {
            return TestUtils::locArray($start, $end);
        };
        $expected = ['kind' => NodeKind::DOCUMENT, 'definitions' => [['kind' => NodeKind::SCALAR_TYPE_DEFINITION, 'name' => $this->nameNode('Hello', $loc(7, 12)), 'directives' => [], 'loc' => $loc(0, 12)]], 'loc' => $loc(0, 12)];
        $this->assertEquals($expected, TestUtils::nodeToArray($doc));
    }