/** * @param Request $request * @return string */ public function run(Request $request) { $this->redirectToLoginIfNotLoggedIn($request); $actionName = $request->getGetVal('action') ?: 'notFound'; $action = $this->actionBuilder->createAction($actionName); $response = $action->run($request); $this->getServiceContainer()->getSession()->save(); return $this->handleResponse($response); }
public function testReturnsValidActionIfRequested() { $result = $this->actionBuilder->createAction('listUrls'); $this->assertInstanceOf('Model\\Action\\ListUrlsAction', $result); }