Skip to content

Commit 91384be

Browse files
committed
add test case for null token before closing bracket
1 parent 211b249 commit 91384be

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/Parser/ParserTest.php

+15
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@ public function testCheckCommentsAreIgnored()
2727

2828
self::assertEmpty($parser->getErrors());
2929
}
30+
31+
/**
32+
* Allows us to check if the parser can parse null tokens before closing brackets
33+
*/
34+
public function testCheckParseOfNullTokensBeforeClosingBracket()
35+
{
36+
$query = 'query{
37+
someField(value:null)
38+
}';
39+
40+
$parser = new Parser();
41+
$parser->parse($query);
42+
43+
self::assertEmpty($parser->getErrors());
44+
}
3045

3146
/**
3247
* Allows us to check if a complex but valid query can be parsed

0 commit comments

Comments
 (0)