/** * 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 module * * @return string */ public static function getModule() { return self::getParam('_module', Router::getDefaultModule()); }