From 60f3d7f83d23014f9cfb7d8494d6cebd2f8b24a3 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 24 Jan 2016 18:37:17 -0500 Subject: Fix broken test --- tests/units/Helper/UserHelperTest.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests') diff --git a/tests/units/Helper/UserHelperTest.php b/tests/units/Helper/UserHelperTest.php index 2b503157..67ccee73 100644 --- a/tests/units/Helper/UserHelperTest.php +++ b/tests/units/Helper/UserHelperTest.php @@ -80,7 +80,7 @@ class UserHelperTest extends Base $this->assertEquals(1, $project->create(array('name' => 'My project'))); - $this->assertTrue($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertTrue($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertTrue($helper->hasProjectAccess('board', 'show', 1)); } @@ -96,7 +96,7 @@ class UserHelperTest extends Base $this->assertEquals(1, $project->create(array('name' => 'My project'))); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 1)); } @@ -112,7 +112,7 @@ class UserHelperTest extends Base $this->assertEquals(1, $project->create(array('name' => 'My project'))); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 1)); } @@ -133,12 +133,12 @@ class UserHelperTest extends Base $this->assertEquals(2, $user->create(array('username' => 'user'))); $this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_MANAGER)); - $this->assertTrue($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertTrue($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertTrue($helper->hasProjectAccess('board', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('task', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('taskcreation', 'save', 1)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 2)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 2)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('task', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('taskcreation', 'save', 2)); @@ -161,12 +161,12 @@ class UserHelperTest extends Base $this->assertEquals(2, $user->create(array('username' => 'user'))); $this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_MANAGER)); - $this->assertTrue($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertTrue($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertTrue($helper->hasProjectAccess('board', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('task', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('taskcreation', 'save', 1)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 2)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 2)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('task', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('taskcreation', 'save', 2)); @@ -189,12 +189,12 @@ class UserHelperTest extends Base $this->assertEquals(2, $user->create(array('username' => 'user'))); $this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_MEMBER)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertTrue($helper->hasProjectAccess('board', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('task', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('taskcreation', 'save', 1)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 2)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 2)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('task', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('taskcreation', 'save', 2)); @@ -217,12 +217,12 @@ class UserHelperTest extends Base $this->assertEquals(2, $user->create(array('username' => 'user'))); $this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_VIEWER)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertTrue($helper->hasProjectAccess('board', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('task', 'show', 1)); $this->assertFalse($helper->hasProjectAccess('taskcreation', 'save', 1)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 2)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 2)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('task', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('taskcreation', 'save', 2)); -- cgit v1.2.3