summaryrefslogtreecommitdiff
path: root/tests/units/ProjectTest.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-08-15 17:23:41 -0700
committerFrédéric Guillot <fred@kanboard.net>2014-08-15 17:23:41 -0700
commit9eeded33f68872515954a2fc177fcb47a9273ae9 (patch)
treef3ef9507e087ca6bf3ce624232da240a8689b051 /tests/units/ProjectTest.php
parentc539bdc8ab746c5afd48cf87de057dc38d50adac (diff)
Add email notifications
Diffstat (limited to 'tests/units/ProjectTest.php')
-rw-r--r--tests/units/ProjectTest.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/units/ProjectTest.php b/tests/units/ProjectTest.php
index 5ca8177c..cb7aee36 100644
--- a/tests/units/ProjectTest.php
+++ b/tests/units/ProjectTest.php
@@ -12,7 +12,7 @@ class ProjectTest extends Base
{
public function testCreation()
{
- $p = new Project($this->db, $this->event);
+ $p = new Project($this->registry);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertNotEmpty($p->getById(1));
@@ -21,10 +21,10 @@ class ProjectTest extends Base
public function testAllowEverybody()
{
// We create a regular user
- $user = new User($this->db, $this->event);
+ $user = new User($this->registry);
$user->create(array('username' => 'unittest', 'password' => 'unittest'));
- $p = new Project($this->db, $this->event);
+ $p = new Project($this->registry);
$this->assertEmpty($p->getAllowedUsers(1)); // Nobody is specified for the given project
$this->assertTrue($p->isUserAllowed(1, 1)); // Everybody should be allowed
$this->assertTrue($p->isUserAllowed(1, 2)); // Everybody should be allowed
@@ -32,8 +32,8 @@ class ProjectTest extends Base
public function testAllowUser()
{
- $p = new Project($this->db, $this->event);
- $user = new User($this->db, $this->event);
+ $p = new Project($this->registry);
+ $user = new User($this->registry);
$user->create(array('username' => 'unittest', 'password' => 'unittest'));
// We create a project
@@ -58,9 +58,9 @@ class ProjectTest extends Base
public function testRevokeUser()
{
- $p = new Project($this->db, $this->event);
+ $p = new Project($this->registry);
- $user = new User($this->db, $this->event);
+ $user = new User($this->registry);
$user->create(array('username' => 'unittest', 'password' => 'unittest'));
// We create a project
@@ -113,9 +113,9 @@ class ProjectTest extends Base
public function testUsersList()
{
- $p = new Project($this->db, $this->event);
+ $p = new Project($this->registry);
- $user = new User($this->db, $this->event);
+ $user = new User($this->registry);
$user->create(array('username' => 'unittest', 'password' => 'unittest'));
// We create project