diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php index 0ff514df6..80d6cda58 100644 --- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php @@ -1721,6 +1721,25 @@ class AuthComponentTest extends CakeTestCase { $this->Auth->startup($this->Controller); } +/** + * testStatelessLoginSetsUser method + * + * @return void + */ + public function testStatelessLoginSetsUser() { + $user = array( + 'id' => 1, + 'username' => 'mark' + ); + + AuthComponent::$sessionKey = false; + $result = $this->Auth->login($user); + $this->assertTrue($result); + + $this->assertTrue($this->Auth->loggedIn()); + $this->assertEquals($user, $this->Auth->user()); + } + /** * testStatelessAuthNoSessionStart method *