/** * @test * @author Robert Lemke <*****@*****.**> */ public function getArgumentNamesReturnsNamesOfAddedArguments() { $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); $arguments->addNewArgument('first'); $arguments->addNewArgument('second'); $arguments->addNewArgument('third'); $expectedArgumentNames = array('first', 'second', 'third'); $this->assertEquals($expectedArgumentNames, $arguments->getArgumentNames(), 'Returned argument names were not as expected.'); }