@@ 75-87 (lines=13) @@ | ||
72 | return $this->data; |
|
73 | } |
|
74 | ||
75 | private function init($source = null) |
|
76 | { |
|
77 | $this->initTokenizer($source); |
|
78 | ||
79 | $this->data = [ |
|
80 | 'queries' => [], |
|
81 | 'mutations' => [], |
|
82 | 'fragments' => [], |
|
83 | 'fragmentReferences' => [], |
|
84 | 'variables' => [], |
|
85 | 'variableReferences' => [], |
|
86 | ]; |
|
87 | } |
|
88 | ||
89 | protected function parseOperation($type = Token::TYPE_QUERY) |
|
90 | { |
@@ 39-51 (lines=13) @@ | ||
36 | class ParserTest extends \PHPUnit_Framework_TestCase |
|
37 | { |
|
38 | ||
39 | public function testEmptyParser() |
|
40 | { |
|
41 | $parser = new Parser(); |
|
42 | ||
43 | $this->assertEquals([ |
|
44 | 'queries' => [], |
|
45 | 'mutations' => [], |
|
46 | 'fragments' => [], |
|
47 | 'fragmentReferences' => [], |
|
48 | 'variables' => [], |
|
49 | 'variableReferences' => [], |
|
50 | ], $parser->parse()); |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * @expectedException Youshido\GraphQL\Exception\Parser\SyntaxErrorException |