GraphQL\Tests\Language\LexerTest::testErrorsRespectWhitespace PHP Method

testErrorsRespectWhitespace() public method

    public function testErrorsRespectWhitespace()
    {
        $example = "\n\n    ?\n\n\n";
        try {
            $this->lexOne($example);
            $this->fail('Expected exception not thrown');
        } catch (SyntaxError $e) {
            $this->assertEquals('Syntax Error GraphQL (3:5) Cannot parse the unexpected character "?".' . "\n" . "\n" . "2: \n" . "3:     ?\n" . "       ^\n" . "4: \n", $e->getMessage());
        }
    }