Skip to content
Permalink
Browse files

Add tests for getRequest()

  • Loading branch information...
markstory committed May 10, 2012
1 parent df84dac commit dd754b12c6c1171fa14ee00c851579422e2e5ac7
Showing with 16 additions and 0 deletions.
  1. +16 −0 lib/Cake/Test/TestCase/Routing/RouterTest.php
@@ -2040,6 +2040,22 @@ public function testSetRequestInfoLegacy() {
$this->assertEquals('/', $result->webroot);
}
/**
* test get request.
*
* @return void
*/
public function testGetRequest() {
$requestA = new Request('/', false);
$requestB = new Request('/posts', false);
Router::pushRequest($requestA);
Router::pushRequest($requestB);
$this->assertSame($requestA, Router::getRequest(false));
$this->assertSame($requestB, Router::getRequest(true));
}
/**
* Test that Router::url() uses the first request
*/

0 comments on commit dd754b1

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