public function testDoesNotAllowNonNullListsToBeNull()
{
$doc = '
query q($input:[String]!) {
nnList(input: $input)
}
';
$ast = Parser::parse($doc);
$expected = FormattedError::create('Variable "$input" got invalid value null.' . "\n" . 'Expected "[String]!", found null.', [new SourceLocation(2, 17)]);
try {
$this->assertEquals($expected, Executor::execute($this->schema(), $ast, null, null, ['input' => null])->toArray());
$this->fail('Expected exception not thrown');
} catch (Error $e) {
$this->assertEquals($expected, Error::formatError($e));
}
}