Update unit tests

This commit is contained in:
Frédéric Guillot
2019-01-30 22:25:57 -08:00
parent 83deec2e36
commit 928f80d569
3 changed files with 13 additions and 7 deletions

View File

@@ -56,7 +56,7 @@ class AuthenticationManagerTest extends Base
$authManager = new AuthenticationManager($this->container);
$authManager->register(new DatabaseAuth($this->container));
$_SESSION['user'] = array('id' => 1, 'username' => 'test');
$_SESSION['user'] = array('id' => 1, 'username' => 'test', 'role' => 'app-admin');
$this->assertTrue($this->container['userSession']->isLogged());
$this->assertTrue($authManager->checkCurrentSession());
@@ -67,7 +67,7 @@ class AuthenticationManagerTest extends Base
$authManager = new AuthenticationManager($this->container);
$authManager->register(new DatabaseAuth($this->container));
$_SESSION['user'] = array('id' => 42, 'username' => 'test');
$_SESSION['user'] = array('id' => 42, 'username' => 'test', 'role' => 'app-admin');
$this->assertTrue($this->container['userSession']->isLogged());
$this->assertFalse($authManager->checkCurrentSession());