Add test to ceck if session marked as userkey session
This commit is contained in:
parent
5de0871171
commit
97cd90dcfe
1 changed files with 2 additions and 1 deletions
|
@ -551,7 +551,7 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
|
||||||
* Test that a user loggs in correctly.
|
* Test that a user loggs in correctly.
|
||||||
*/
|
*/
|
||||||
public function test_that_user_logged_in() {
|
public function test_that_user_logged_in() {
|
||||||
global $DB, $USER;
|
global $DB, $USER, $SESSION;
|
||||||
|
|
||||||
$key = new stdClass();
|
$key = new stdClass();
|
||||||
$key->value = 'UserLogin';
|
$key->value = 'UserLogin';
|
||||||
|
@ -571,6 +571,7 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
|
||||||
$this->assertEquals('/', $redirect);
|
$this->assertEquals('/', $redirect);
|
||||||
$this->assertEquals($this->user->id, $USER->id);
|
$this->assertEquals($this->user->id, $USER->id);
|
||||||
$this->assertSame(sesskey(), $USER->sesskey);
|
$this->assertSame(sesskey(), $USER->sesskey);
|
||||||
|
$this->assertObjectHasAttribute('userkey', $SESSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue