diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-14 22:44:25 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-14 22:44:25 -0500 |
commit | b081288188bb1744c9d7bd075aa5936e0ccbb9c4 (patch) | |
tree | 68008e35eb129f74b9b2a49f6f6076ed02b601c6 /tests/units/ProjectPermissionTest.php | |
parent | 1487cb27634161ef558c367150213bc7077e4198 (diff) |
Use Pimple instead of Core\Registry and add Monolog for logging
Diffstat (limited to 'tests/units/ProjectPermissionTest.php')
-rw-r--r-- | tests/units/ProjectPermissionTest.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/units/ProjectPermissionTest.php b/tests/units/ProjectPermissionTest.php index fd0c7331..394e0ac5 100644 --- a/tests/units/ProjectPermissionTest.php +++ b/tests/units/ProjectPermissionTest.php @@ -10,12 +10,12 @@ class ProjectPermissionTest extends Base { public function testAllowEverybody() { - $user = new User($this->registry); + $user = new User($this->container); $this->assertTrue($user->create(array('username' => 'unittest#1', 'password' => 'unittest'))); $this->assertTrue($user->create(array('username' => 'unittest#2', 'password' => 'unittest'))); - $p = new Project($this->registry); - $pp = new ProjectPermission($this->registry); + $p = new Project($this->container); + $pp = new ProjectPermission($this->container); $this->assertEquals(1, $p->create(array('name' => 'UnitTest'))); $this->assertFalse($pp->isEverybodyAllowed(1)); @@ -37,11 +37,11 @@ class ProjectPermissionTest extends Base public function testDisallowEverybody() { // We create a regular user - $user = new User($this->registry); + $user = new User($this->container); $user->create(array('username' => 'unittest', 'password' => 'unittest')); - $p = new Project($this->registry); - $pp = new ProjectPermission($this->registry); + $p = new Project($this->container); + $pp = new ProjectPermission($this->container); $this->assertEquals(1, $p->create(array('name' => 'UnitTest'))); @@ -52,9 +52,9 @@ class ProjectPermissionTest extends Base public function testAllowUser() { - $p = new Project($this->registry); - $pp = new ProjectPermission($this->registry); - $user = new User($this->registry); + $p = new Project($this->container); + $pp = new ProjectPermission($this->container); + $user = new User($this->container); $user->create(array('username' => 'unittest', 'password' => 'unittest')); @@ -79,9 +79,9 @@ class ProjectPermissionTest extends Base public function testRevokeUser() { - $p = new Project($this->registry); - $pp = new ProjectPermission($this->registry); - $user = new User($this->registry); + $p = new Project($this->container); + $pp = new ProjectPermission($this->container); + $user = new User($this->container); $user->create(array('username' => 'unittest', 'password' => 'unittest')); @@ -135,10 +135,10 @@ class ProjectPermissionTest extends Base public function testUsersList() { - $p = new Project($this->registry); - $pp = new ProjectPermission($this->registry); + $p = new Project($this->container); + $pp = new ProjectPermission($this->container); - $user = new User($this->registry); + $user = new User($this->container); $user->create(array('username' => 'unittest', 'password' => 'unittest')); // We create project |