GraphQL\Tests\Executor\VariablesTest::testAllowsNullableInputsToBeSetToAValueInAVariable PHP Метод

testAllowsNullableInputsToBeSetToAValueInAVariable() публичный Метод

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