| @@ 69-81 (lines=13) @@ | ||
| 66 | return $this->data; |
|
| 67 | } |
|
| 68 | ||
| 69 | private function init($source = null) |
|
| 70 | { |
|
| 71 | $this->initTokenizer($source); |
|
| 72 | ||
| 73 | $this->data = [ |
|
| 74 | 'queries' => [], |
|
| 75 | 'mutations' => [], |
|
| 76 | 'fragments' => [], |
|
| 77 | 'fragmentReferences' => [], |
|
| 78 | 'variables' => [], |
|
| 79 | 'variableReferences' => [] |
|
| 80 | ]; |
|
| 81 | } |
|
| 82 | ||
| 83 | protected function parseBody($token = Token::TYPE_QUERY, $highLevel = true) |
|
| 84 | { |
|
| @@ 27-39 (lines=13) @@ | ||
| 24 | class ParserTest extends \PHPUnit_Framework_TestCase |
|
| 25 | { |
|
| 26 | ||
| 27 | public function testEmptyParser() |
|
| 28 | { |
|
| 29 | $parser = new Parser(); |
|
| 30 | ||
| 31 | $this->assertEquals([ |
|
| 32 | 'queries' => [], |
|
| 33 | 'mutations' => [], |
|
| 34 | 'fragments' => [], |
|
| 35 | 'fragmentReferences' => [], |
|
| 36 | 'variables' => [], |
|
| 37 | 'variableReferences' => [], |
|
| 38 | ], $parser->parse()); |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * @expectedException Youshido\GraphQL\Parser\Exception\SyntaxErrorException |
|