public function testSimpleFieldWithTwoArgs()
{
$body = '
type Hello {
world(argOne: Boolean, argTwo: Int): String
}';
$doc = Parser::parse($body);
$loc = function ($start, $end) {
return TestUtils::locArray($start, $end);
};
$expected = ['kind' => NodeKind::DOCUMENT, 'definitions' => [['kind' => NodeKind::OBJECT_TYPE_DEFINITION, 'name' => $this->nameNode('Hello', $loc(6, 11)), 'interfaces' => [], 'directives' => [], 'fields' => [$this->fieldNodeWithArgs($this->nameNode('world', $loc(16, 21)), $this->typeNode('String', $loc(53, 59)), [$this->inputValueNode($this->nameNode('argOne', $loc(22, 28)), $this->typeNode('Boolean', $loc(30, 37)), null, $loc(22, 37)), $this->inputValueNode($this->nameNode('argTwo', $loc(39, 45)), $this->typeNode('Int', $loc(47, 50)), null, $loc(39, 50))], $loc(16, 59))], 'loc' => $loc(1, 61)]], 'loc' => $loc(0, 61)];
$this->assertEquals($expected, TestUtils::nodeToArray($doc));
}