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