/**
  * @test
  */
 public function objectStoresDataCorrectly()
 {
     $name = 'This is a name';
     $description = 'Example desc';
     $type = 'string';
     $isRequired = TRUE;
     $isMethodParameter = TRUE;
     $argumentDefinition = new ArgumentDefinition($name, $type, $description, $isRequired, NULL);
     $this->assertEquals($argumentDefinition->getName(), $name, 'Name could not be retrieved correctly.');
     $this->assertEquals($argumentDefinition->getDescription(), $description, 'Description could not be retrieved correctly.');
     $this->assertEquals($argumentDefinition->getType(), $type, 'Type could not be retrieved correctly');
     $this->assertEquals($argumentDefinition->isRequired(), $isRequired, 'Required flag could not be retrieved correctly.');
 }
 /**
  * @test
  * @dataProvider getValidateArgumentsErrorsTestValues
  * @param ArgumentDefinition $argument
  * @param mixed $value
  */
 public function testValidateArgumentsErrors(ArgumentDefinition $argument, $value)
 {
     $viewHelper = $this->getAccessibleMock('NamelessCoder\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('hasArgument', 'prepareArguments'), array(), '', FALSE);
     $viewHelper->expects($this->once())->method('prepareArguments')->willReturn(array($argument->getName() => $argument));
     $viewHelper->expects($this->once())->method('hasArgument')->with($argument->getName())->willReturn(TRUE);
     $viewHelper->setArguments(array($argument->getName() => $value));
     $this->setExpectedException('InvalidArgumentException');
     $viewHelper->validateArguments();
 }