public getArgument ( string $argumentName ) : |
||
$argumentName | string | Name of the argument to retrieve |
return |
public function getArgument($argumentName)
{
return $this->offsetGet($argumentName);
}
/** * @test */ public function getArgumentWithNonExistingArgumentNameThrowsException() { $arguments = new Arguments(); try { $arguments->getArgument('someArgument'); $this->fail('getArgument() did not throw an exception although the specified argument does not exist.'); } catch (NoSuchArgumentException $exception) { $this->assertTrue(true); } }