/** * @test * @author Robert Lemke <*****@*****.**> */ public function getArgumentShortNamesReturnsShortNamesOfAddedArguments() { $mockObjectFactory = $this->getMock('F3\\FLOW3\\Object\\ObjectFactoryInterface'); $mockObjectFactory->expects($this->exactly(3))->method('create')->will($this->onConsecutiveCalls(new \F3\FLOW3\MVC\Controller\Argument('first', 'Text'), new \F3\FLOW3\MVC\Controller\Argument('second', 'Text'), new \F3\FLOW3\MVC\Controller\Argument('third', 'Text'))); $arguments = new \F3\FLOW3\MVC\Controller\Arguments($mockObjectFactory); $argument = $arguments->addNewArgument('first')->setShortName('a'); $arguments->addNewArgument('second')->setShortName('b'); $arguments->addNewArgument('third')->setShortName('c'); $expectedShortNames = array('a', 'b', 'c'); $this->assertEquals($expectedShortNames, $arguments->getArgumentShortNames(), 'Returned argument short names were not as expected.'); }