Permalink
Browse files

test for REQUEST_URI pages/test_app_test:<something>

fails for numeric argument
  • Loading branch information...
1 parent 6fc47ce commit 9ee2496db5f5ee94b75109478d8fffd77a6e17e5 @hans-d hans-d committed Jul 6, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 tests/cases/action/RequestTest.php
@@ -177,6 +177,23 @@ public function testRequestWithoutUrlQueryParam() {
$this->assertEqual('pages/test_app', $request->url);
}
+ public function testRequestWithColon() {
+ unset($_GET['url']);
+ $request = new Request(array('env' => array(
+ 'PHP_SELF' => '/test_app/app/webroot/index.php',
+ 'REQUEST_URI' => '/test_app/pages/test_app/test:a'
+ )));
+ $this->assertEqual('/test_app', $request->env('base'));
+ $this->assertEqual('pages/test_app/test:a', $request->url);
+
+ $request = new Request(array('env' => array(
+ 'PHP_SELF' => '/test_app/app/webroot/index.php',
+ 'REQUEST_URI' => '/test_app/pages/test_app/test:1'
+ )));
+ $this->assertEqual('/test_app', $request->env('base'));
+ $this->assertEqual('pages/test_app/test:1', $request->url);
+ }
+
public function testRequestWithoutUrlQueryParamAndNoApp() {
unset($_GET['url']);
$request = new Request(array('env' => array(

0 comments on commit 9ee2496

Please sign in to comment.