/** * Test run Index Controller if Index Module */ public function testIndexController() { // setup Request $request = new ServerRequest([], [], '', Request::METHOD_GET, 'php://input', ['Accept' => 'text/html']); Request::setInstance($request); // run Application $this->getApp()->process(); $this->assertEquals(Router::getDefaultModule(), $this->getApp()->getModule()); $this->assertEquals(Router::getDefaultController(), $this->getApp()->getController()); }
/** * Test Helper RedirectTo * * @expectedException \Bluz\Application\Exception\RedirectException */ public function testHelperRedirectTo() { Response::redirectTo(Router::getDefaultModule(), Router::getDefaultController()); }
/** * Test Helper RedirectTo * * @expectedException \Bluz\Application\Exception\RedirectException */ public function testHelperRedirectTo() { $this->getApp()->redirectTo(Router::getDefaultModule(), Router::getDefaultController()); }
/** * Get controller * * @return string */ public static function getController() { return self::getParam('_controller', Router::getDefaultController()); }