GraphQL\Tests\Executor\VariablesTest::testAllowsNullableInputsToBeSetToNullInAVariable PHP Method

testAllowsNullableInputsToBeSetToNullInAVariable() public method

    public function testAllowsNullableInputsToBeSetToNullInAVariable()
    {
        $doc = '
      query SetsNullable($value: String) {
        fieldWithNullableStringInput(input: $value)
      }
        ';
        $ast = Parser::parse($doc);
        $expected = ['data' => ['fieldWithNullableStringInput' => null]];
        $this->assertEquals($expected, Executor::execute($this->schema(), $ast, null, ['value' => null])->toArray());
    }