Add test to ceck if session marked as userkey session

This commit is contained in:
Dmitrii Metelkin 2016-08-19 11:58:14 +10:00
parent 5de0871171
commit 97cd90dcfe

View file

@ -551,7 +551,7 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
* Test that a user loggs in correctly.
*/
public function test_that_user_logged_in() {
global $DB, $USER;
global $DB, $USER, $SESSION;
$key = new stdClass();
$key->value = 'UserLogin';
@ -571,6 +571,7 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
$this->assertEquals('/', $redirect);
$this->assertEquals($this->user->id, $USER->id);
$this->assertSame(sesskey(), $USER->sesskey);
$this->assertObjectHasAttribute('userkey', $SESSION);
}
/**