mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
updating auth test
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5604 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
0ed8c17f80
commit
9d2a62752d
1 changed files with 8 additions and 3 deletions
|
@ -361,12 +361,17 @@ class AuthTest extends CakeTestCase {
|
|||
$this->Controller->Session->del('Auth');
|
||||
|
||||
$_SERVER['HTTP_REFERER'] = '/admin/';
|
||||
|
||||
$this->Controller->Session->write('Auth', array('AuthUser' => array('id'=>'1', 'username'=>'nate')));
|
||||
|
||||
$this->Controller->params['url']['url'] = 'users/login';
|
||||
$this->Controller->Auth->initialize($this->Controller);
|
||||
$this->Controller->params['url']['url'] = 'auth_test/login';
|
||||
|
||||
$this->Controller->Auth->initialize($this->Controller);
|
||||
|
||||
$this->Controller->Auth->loginAction = 'auth_test/login';
|
||||
|
||||
$this->Controller->Auth->userModel = 'AuthUser';
|
||||
$this->Controller->Auth->loginRedirect = null;
|
||||
$this->Controller->Auth->loginRedirect = false;
|
||||
$this->Controller->Auth->startup($this->Controller);
|
||||
$expected = $this->Controller->Auth->_normalizeURL('admin');
|
||||
$this->assertEqual($expected, $this->Controller->Auth->redirect());
|
||||
|
|
Loading…
Add table
Reference in a new issue