Skip to content
Permalink
Browse files

Change REQUEST_URI by PATH_INFO to match Router.php definitions

Signed-off-by: Rogerio Prado de Jesus <rogeriopradoj@gmail.com>
  • Loading branch information...
rogeriopradoj committed Oct 20, 2013
1 parent dcfb205 commit 6393dea2511dd4b24d23c889c709b49d1e5ca641
Showing with 4 additions and 4 deletions.
  1. +4 −4 app/tests/cases/Tools_Util_Router_Test.php
@@ -33,10 +33,10 @@ public function setUp() {
parent::setUp();
$this->scriptName = @$_SERVER['SCRIPT_NAME'];
$this->requestURI = @$_SERVER['REQUEST_URI'];
$this->requestURI = @$_SERVER['PATH_INFO'];
$_SERVER['SCRIPT_NAME'] = 'index.php';
$_SERVER['REQUEST_URI'] = '/tools/util/router';
$_SERVER['PATH_INFO'] = '/tools/util/router';
}
public function testDefaultOptionsForRoutes() {
@@ -91,7 +91,7 @@ public function testExecuteRoute() {
* Cannot test error 404... we need to change things
*/
public function testExecuteRouteError404() {
//$_SERVER['REQUEST_URI'] = '/tools/nonexisting/action';
//$_SERVER['PATH_INFO'] = '/tools/nonexisting/action';
//$Router = new Router(Array());
//$route = $Router->parseRoute();
@@ -107,7 +107,7 @@ public function tearDown() {
parent::tearDown();
$_SERVER['SCRIPT_NAME'] = $this->scriptName;
$_SERVER['REQUEST_URI'] = $this->requestURI;
$_SERVER['PATH_INFO'] = $this->requestURI;
unset($this->scriptName, $this->requestURI);
}

0 comments on commit 6393dea

Please sign in to comment.
You can’t perform that action at this time.