diff options
author | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-04-19 22:12:12 -0400 |
---|---|---|
committer | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-04-19 22:12:12 -0400 |
commit | a04ecbde778decfdea7200806a6b1144861ae05f (patch) | |
tree | e4670e3013734d9c7bd201f5d6ef1fbaae13d3b5 /tests | |
parent | 5aacb6a76351889a6ec5ed01c8e80f139c2b2027 (diff) |
Add RememberMe feature and authentications history
Diffstat (limited to 'tests')
-rw-r--r-- | tests/AclTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/AclTest.php b/tests/AclTest.php index 566d7245..6b392a28 100644 --- a/tests/AclTest.php +++ b/tests/AclTest.php @@ -30,16 +30,16 @@ class AclTest extends Base $_SESSION = array('user' => array()); $this->assertFalse($acl->isAdminUser()); - $_SESSION = array('user' => array('is_admin' => true)); + $_SESSION = array('user' => array('is_admin' => '1')); $this->assertFalse($acl->isAdminUser()); - $_SESSION = array('user' => array('is_admin' => '0')); + $_SESSION = array('user' => array('is_admin' => false)); $this->assertFalse($acl->isAdminUser()); $_SESSION = array('user' => array('is_admin' => '2')); $this->assertFalse($acl->isAdminUser()); - $_SESSION = array('user' => array('is_admin' => '1')); + $_SESSION = array('user' => array('is_admin' => true)); $this->assertTrue($acl->isAdminUser()); } @@ -56,13 +56,13 @@ class AclTest extends Base $_SESSION = array('user' => array('is_admin' => true)); $this->assertFalse($acl->isRegularUser()); - $_SESSION = array('user' => array('is_admin' => '1')); + $_SESSION = array('user' => array('is_admin' => true)); $this->assertFalse($acl->isRegularUser()); $_SESSION = array('user' => array('is_admin' => '2')); $this->assertFalse($acl->isRegularUser()); - $_SESSION = array('user' => array('is_admin' => '0')); + $_SESSION = array('user' => array('is_admin' => false)); $this->assertTrue($acl->isRegularUser()); } @@ -84,7 +84,7 @@ class AclTest extends Base $this->assertTrue($acl->isPageAccessAllowed('board', 'readonly')); // Regular user - $_SESSION = array('user' => array('is_admin' => '0')); + $_SESSION = array('user' => array('is_admin' => false)); $this->assertFalse($acl->isPageAccessAllowed('user', 'create')); $this->assertFalse($acl->isPageAccessAllowed('user', 'save')); $this->assertFalse($acl->isPageAccessAllowed('user', 'remove')); @@ -97,7 +97,7 @@ class AclTest extends Base $this->assertTrue($acl->isPageAccessAllowed('board', 'readonly')); // Admin user - $_SESSION = array('user' => array('is_admin' => '1')); + $_SESSION = array('user' => array('is_admin' => true)); $this->assertTrue($acl->isPageAccessAllowed('user', 'create')); $this->assertTrue($acl->isPageAccessAllowed('user', 'save')); $this->assertTrue($acl->isPageAccessAllowed('user', 'remove')); |