Example #1
0
 public function testGetRouteWithParameters()
 {
     $_SERVER['REQUEST_METHOD'] = 'GET';
     $_SERVER['REQUEST_URI'] = '/index.php/blog/login/test@yes.com/success';
     // joke no get with login
     $this->routerConfig['blog']['login']['params']['get'] = 'email/password';
     $this->router->setRoutingConfig($this->routerConfig);
     $this->route->generate($this->router);
     $params = [0 => '*****@*****.**', 1 => 'success'];
     $this->assertEquals($this->route->getParams(), $params);
 }