summaryrefslogtreecommitdiff
path: root/tests/units/Helper/UserHelperTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-03-04 20:10:34 -0500
committerFrederic Guillot <fred@kanboard.net>2016-03-04 20:10:34 -0500
commit8f3e2b2e5c62a6130f6c8867ab335fb4c1a32c5c (patch)
treece28cdc2dba9c31560ef753ac1b4dc39d567b7a6 /tests/units/Helper/UserHelperTest.php
parentf32507d423c46e8e9612b5239728e6c617e4cbcb (diff)
Helper refactoring
Diffstat (limited to 'tests/units/Helper/UserHelperTest.php')
-rw-r--r--tests/units/Helper/UserHelperTest.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/units/Helper/UserHelperTest.php b/tests/units/Helper/UserHelperTest.php
index f1099faa..7ee6e8bb 100644
--- a/tests/units/Helper/UserHelperTest.php
+++ b/tests/units/Helper/UserHelperTest.php
@@ -2,7 +2,7 @@
require_once __DIR__.'/../Base.php';
-use Kanboard\Helper\User;
+use Kanboard\Helper\UserHelper;
use Kanboard\Model\Project;
use Kanboard\Model\ProjectUserRole;
use Kanboard\Model\User as UserModel;
@@ -12,7 +12,7 @@ class UserHelperTest extends Base
{
public function testInitials()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$this->assertEquals('CN', $helper->getInitials('chuck norris'));
$this->assertEquals('A', $helper->getInitials('admin'));
@@ -20,7 +20,7 @@ class UserHelperTest extends Base
public function testGetRoleName()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$this->assertEquals('Administrator', $helper->getRoleName(Role::APP_ADMIN));
$this->assertEquals('Manager', $helper->getRoleName(Role::APP_MANAGER));
$this->assertEquals('Project Viewer', $helper->getRoleName(Role::PROJECT_VIEWER));
@@ -28,7 +28,7 @@ class UserHelperTest extends Base
public function testHasAccessForAdmins()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$this->container['sessionStorage']->user = array(
'id' => 2,
@@ -42,7 +42,7 @@ class UserHelperTest extends Base
public function testHasAccessForManagers()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$this->container['sessionStorage']->user = array(
'id' => 2,
@@ -56,7 +56,7 @@ class UserHelperTest extends Base
public function testHasAccessForUsers()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$this->container['sessionStorage']->user = array(
'id' => 2,
@@ -70,7 +70,7 @@ class UserHelperTest extends Base
public function testHasProjectAccessForAdmins()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$project = new Project($this->container);
$this->container['sessionStorage']->user = array(
@@ -86,7 +86,7 @@ class UserHelperTest extends Base
public function testHasProjectAccessForManagers()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$project = new Project($this->container);
$this->container['sessionStorage']->user = array(
@@ -102,7 +102,7 @@ class UserHelperTest extends Base
public function testHasProjectAccessForUsers()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$project = new Project($this->container);
$this->container['sessionStorage']->user = array(
@@ -118,7 +118,7 @@ class UserHelperTest extends Base
public function testHasProjectAccessForAppManagerAndProjectManagers()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$user = new UserModel($this->container);
$project = new Project($this->container);
$projectUserRole = new ProjectUserRole($this->container);
@@ -146,7 +146,7 @@ class UserHelperTest extends Base
public function testHasProjectAccessForProjectManagers()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$user = new UserModel($this->container);
$project = new Project($this->container);
$projectUserRole = new ProjectUserRole($this->container);
@@ -174,7 +174,7 @@ class UserHelperTest extends Base
public function testHasProjectAccessForProjectMembers()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$user = new UserModel($this->container);
$project = new Project($this->container);
$projectUserRole = new ProjectUserRole($this->container);
@@ -202,7 +202,7 @@ class UserHelperTest extends Base
public function testHasProjectAccessForProjectViewers()
{
- $helper = new User($this->container);
+ $helper = new UserHelper($this->container);
$user = new UserModel($this->container);
$project = new Project($this->container);
$projectUserRole = new ProjectUserRole($this->container);