diff --git a/tests/Executor/ExecutorTest.php b/tests/Executor/ExecutorTest.php index fe6768c..d3679e8 100644 --- a/tests/Executor/ExecutorTest.php +++ b/tests/Executor/ExecutorTest.php @@ -11,6 +11,7 @@ use GraphQL\Executor\Executor; use GraphQL\Language\Parser; use GraphQL\Tests\Executor\TestClasses\NotSpecial; use GraphQL\Tests\Executor\TestClasses\Special; +use GraphQL\Type\Definition\EnumType; use GraphQL\Type\Definition\InputObjectType; use GraphQL\Type\Definition\InterfaceType; use GraphQL\Type\Definition\ObjectType; @@ -1108,6 +1109,16 @@ class ExecutorTest extends TestCase ], ]), 'defaultValue' => ['a' => 1, 'b' => 'test'], ], + 'i' => [ + 'type' => new EnumType([ + 'name' => 'EnumType', + 'values' => [ + 'VALUE1' => 1, + 'VALUE2' => 2, + ] + ]), + 'defaultValue' => 1 + ] ], ], ], @@ -1117,7 +1128,7 @@ class ExecutorTest extends TestCase $query = Parser::parse('{ field }'); $result = Executor::execute($schema, $query); $expected = [ - 'data' => ['field' => '{"a":1,"b":null,"c":0,"d":false,"e":"0","f":"some-string","h":{"a":1,"b":"test"}}'], + 'data' => ['field' => '{"a":1,"b":null,"c":0,"d":false,"e":"0","f":"some-string","h":{"a":1,"b":"test"},"i":1}'], ]; self::assertEquals($expected, $result->toArray());