public function testField() { $field = new Field('field', null, [], new Location(1, 1)); $this->assertEquals($field->getName(), 'field'); $this->assertEmpty($field->getArguments()); $this->assertFalse($field->hasArguments()); $field->setAlias('alias'); $field->setName('alias'); $this->assertEquals($field->getAlias(), 'alias'); $this->assertEquals($field->getName(), 'alias'); $field->addArgument(new Argument('argument', new Literal('argument value', new Location(1, 1)), new Location(1, 1))); $this->assertTrue($field->hasArguments()); $this->assertEquals(['argument' => 'argument value'], $field->getKeyValueArguments()); }