diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-09-05 23:30:56 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-09-05 23:30:56 -0400 |
commit | 710f2c7bb046b43ec9878ae795a181101f6d7515 (patch) | |
tree | b62723b6b49c3b6bf2b3ca41a772f552464a9031 /tests/units/UserSessionTest.php | |
parent | 94b38dd94bd819168163003beec8ef693f9d9839 (diff) |
Improve unit tests
Diffstat (limited to 'tests/units/UserSessionTest.php')
-rw-r--r-- | tests/units/UserSessionTest.php | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/units/UserSessionTest.php b/tests/units/UserSessionTest.php deleted file mode 100644 index 6a831183..00000000 --- a/tests/units/UserSessionTest.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -require_once __DIR__.'/Base.php'; - -use Core\Session; -use Model\UserSession; - -class UserSessionTest extends Base -{ - public function testIsAdmin() - { - $s = new Session; - $us = new UserSession($this->container); - - $this->assertFalse($us->isAdmin()); - - $s['user'] = array(); - $this->assertFalse($us->isAdmin()); - - $s['user'] = array('is_admin' => '1'); - $this->assertFalse($us->isAdmin()); - - $s['user'] = array('is_admin' => false); - $this->assertFalse($us->isAdmin()); - - $s['user'] = array('is_admin' => '2'); - $this->assertFalse($us->isAdmin()); - - $s['user'] = array('is_admin' => true); - $this->assertTrue($us->isAdmin()); - } -} |