/** * Handles the web request. The response will automatically be sent to the client. * * @return void * @author Robert Lemke <*****@*****.**> */ public function handleRequest() { $request = $this->requestBuilder->build(); $response = $this->objectManager->create('F3\\FLOW3\\MVC\\Web\\Response'); $this->dispatcher->dispatch($request, $response); $response->send(); }
/** * @test * @author Bastian Waidelich <*****@*****.**> */ public function buildSetsPOSTArgumentsFromRequest() { $this->setUpRequestBuilder(); $argument = NULL; $setArgumentCallback = function () use(&$argument) { $args = func_get_args(); if ($args[0] === 'someArgument') { $argument = $args[1]; } }; $this->mockRequest->expects($this->any())->method('getMethod')->will($this->returnValue('POST')); $this->mockEnvironment->expects($this->any())->method('getRawPostArguments')->will($this->returnValue(array('someArgument' => 'POSTArgument'))); $this->mockEnvironment->expects($this->any())->method('getUploadedFiles')->will($this->returnValue(array())); $this->mockRequest->expects($this->exactly(2))->method('setArgument')->will($this->returnCallback($setArgumentCallback)); $this->builder->build(); $this->assertEquals('POSTArgument', $argument); }