Skip to content

Commit

Permalink
test for REQUEST_URI pages/test_app_test:<something>
Browse files Browse the repository at this point in the history
fails for numeric argument
  • Loading branch information
hans-d committed Jul 10, 2012
1 parent 6fc47ce commit 9ee2496
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/cases/action/RequestTest.php
Expand Up @@ -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(
Expand Down

0 comments on commit 9ee2496

Please sign in to comment.