Skip to content
Permalink
Browse files

Added test to prove stateless login sets user

  • Loading branch information...
biesbjerg committed Jul 6, 2016
1 parent f22129b commit c63de8d9f578cab2372b5e938b6b9aba0382c66d
Showing with 19 additions and 0 deletions.
  1. +19 −0 lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
@@ -1721,6 +1721,25 @@ public function testStatelessAuthNoRedirect() {
$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
*

0 comments on commit c63de8d

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