/** * @return null */ public function setUp() { $this->bkRoutes = KernelRegistry::getRouteMap(); $this->bkParams = KernelRegistry::getParams(); $this->front = $this->createMvcFront(); KernelRegistry::clearRouteMap(); KernelRegistry::clearParams(); $routeMap = array('my-route' => 'TestFuel\\Fake\\Action\\TestFront\\ActionA'); KernelRegistry::setRouteMap($routeMap); $cli = null; if (isset($_SERVER['argv'])) { $cli = $_SERVER['argv']; } $this->bkSuperGlobals = array('get' => $_GET, 'post' => $_POST, 'files' => $_FILES, 'cookie' => $_COOKIE, 'argv' => $cli); }
/** * @return null */ public function setUp() { $this->bkRoutes = KernelRegistry::getRouteMap(); $this->bkParams = KernelRegistry::getParams(); KernelRegistry::clearRouteMap(); KernelRegistry::clearParams(); $routeMap = array('action-a' => 'TestFuel\\Fake\\Action\\TestAction\\ActionA', 'action-b' => 'TestFuel\\Fake\\Action\\TestAction\\ActionB', 'action-c' => 'TestFuel\\Fake\\Action\\TestAction\\ActionC'); KernelRegistry::setRouteMap($routeMap); $cli = null; if (isset($_SERVER['argv'])) { $cli = $_SERVER['argv']; } $this->bkSuperGlobals = array('get' => $_GET, 'post' => $_POST, 'files' => $_FILES, 'cookie' => $_COOKIE, 'argv' => $cli); $this->dispatcher = new MvcActionDispatcher(); $this->action = new MvcAction('action-a', $this->dispatcher); }