diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php index 25ed6e9bb..09e99c92e 100644 --- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php @@ -1825,13 +1825,20 @@ class AuthComponentTest extends CakeTestCase { * @return void */ public function testStatelessAuthAllowedActionsRetrieveUser() { + if (CakeSession::id()) { + session_destroy(); + CakeSession::$id = null; + } + $_SESSION = null; + $_SERVER['PHP_AUTH_USER'] = 'mariano'; $_SERVER['PHP_AUTH_PW'] = 'cake'; - $url = '/auth_test/add'; - $this->Controller->request->addParams(Router::parse($url)); + + AuthComponent::$sessionKey = false; $this->Controller->Auth->authenticate = array( 'Basic' => array('userModel' => 'AuthUser') ); + $this->Controller->request['action'] = 'add'; $this->Controller->Auth->initialize($this->Controller); $this->Controller->Auth->allow(); $this->Controller->Auth->startup($this->Controller);