From 3474c6d7e6f371996014b22bab32603db4e137e4 Mon Sep 17 00:00:00 2001 From: Alexandr Viniychuk Date: Tue, 8 Nov 2016 21:53:22 -0500 Subject: [PATCH] test coverage for the fixed https://github.com/Youshido/GraphQL/issues/71 --- Tests/Schema/SchemaTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/Schema/SchemaTest.php b/Tests/Schema/SchemaTest.php index c1fe7c01..d758b7ba 100644 --- a/Tests/Schema/SchemaTest.php +++ b/Tests/Schema/SchemaTest.php @@ -136,6 +136,12 @@ public function testCustomTypes() $result = $processor->getResponseData(); $this->assertEquals(['errors' => [ ['message' => 'Unexpected token "RBRACE" at (1:19)']]], $result); + $processor->getExecutionContext()->clearErrors(); + + $processor->processPayload('{ user { name { invalidSelection } } }'); + $result = $processor->getResponseData(); + + $this->assertEquals(['data' => ['user' => null], 'errors' => [ ['message' => 'You can\'t specify fields for scalar type "String"']]], $result); } }