Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Correcting test case simulation. Closes #6211

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8151 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
commit 82cb895f505e3f50ef14473bc0d11310eadf0fc0 1 parent fd0c39f
@markstory markstory authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 cake/tests/cases/libs/controller/components/auth.test.php
View
10 cake/tests/cases/libs/controller/components/auth.test.php
@@ -839,16 +839,22 @@ function testLoginRedirect() {
$this->assertEqual($expected, $this->Controller->Session->read('Auth.redirect'));
// QueryString parameters
+ $_back = $_GET;
+ $_GET = array(
+ 'url' => '/posts/index/29?print=true&refer=menu',
+ 'print' => 'true',
+ 'refer' => 'menu'
+ );
$this->Controller->Session->del('Auth');
$url = '/posts/index/29?print=true&refer=menu';
- $this->Controller->params = Router::parse($url);
- $this->Controller->params['url']['url'] = Router::normalize($url);
+ $this->Controller->params = Dispatcher::parseParams($url);
$this->Controller->Auth->initialize($this->Controller);
$this->Controller->Auth->loginAction = array('controller' => 'AuthTest', 'action' => 'login');
$this->Controller->Auth->userModel = 'AuthUser';
$this->Controller->Auth->startup($this->Controller);
$expected = Router::normalize('posts/index/29?print=true&refer=menu');
$this->assertEqual($expected, $this->Controller->Session->read('Auth.redirect'));
+ $_GET = $_back;
//external authed action
$_SERVER['HTTP_REFERER'] = 'http://webmail.example.com/view/message';
Please sign in to comment.
Something went wrong with that request. Please try again.