GraphQL\Tests\Executor\ExecutorTest::testDoesNotIncludeArgumentsThatWereNotSet PHP Method

testDoesNotIncludeArgumentsThatWereNotSet() public method

    public function testDoesNotIncludeArgumentsThatWereNotSet()
    {
        $schema = new Schema(['query' => new ObjectType(['name' => 'Type', 'fields' => ['field' => ['type' => Type::string(), 'resolve' => function ($data, $args) {
            return $args ? json_encode($args) : '';
        }, 'args' => ['a' => ['type' => Type::boolean()], 'b' => ['type' => Type::boolean()], 'c' => ['type' => Type::boolean()], 'd' => ['type' => Type::int()], 'e' => ['type' => Type::int()]]]]])]);
        $query = Parser::parse('{ field(a: true, c: false, e: 0) }');
        $result = Executor::execute($schema, $query);
        $expected = ['data' => ['field' => '{"a":true,"c":false,"e":0}']];
        $this->assertEquals($expected, $result->toArray());
    }