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

testReportsErrorForMissingNonNullableInputs() public method

    public function testReportsErrorForMissingNonNullableInputs()
    {
        $doc = '
      {
        fieldWithNonNullableStringInput
      }
        ';
        $ast = Parser::parse($doc);
        $expected = ['data' => ['fieldWithNonNullableStringInput' => null], 'errors' => [['message' => 'Argument "input" of required type "String!" was not provided.', 'locations' => [['line' => 3, 'column' => 9]], 'path' => ['fieldWithNonNullableStringInput']]]];
        $this->assertEquals($expected, Executor::execute($this->schema(), $ast)->toArray());
    }