summaryrefslogtreecommitdiff
path: root/tests/units/CommentTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/CommentTest.php')
-rw-r--r--tests/units/CommentTest.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/units/CommentTest.php b/tests/units/CommentTest.php
index 46f05abc..fa790555 100644
--- a/tests/units/CommentTest.php
+++ b/tests/units/CommentTest.php
@@ -10,9 +10,9 @@ class CommentTest extends Base
{
public function testCreate()
{
- $c = new Comment($this->db, $this->event);
- $t = new Task($this->db, $this->event);
- $p = new Project($this->db, $this->event);
+ $c = new Comment($this->registry);
+ $t = new Task($this->registry);
+ $p = new Project($this->registry);
$this->assertEquals(1, $p->create(array('name' => 'test1')));
$this->assertEquals(1, $t->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 3, 'owner_id' => 1)));
@@ -30,9 +30,9 @@ class CommentTest extends Base
public function testGetAll()
{
- $c = new Comment($this->db, $this->event);
- $t = new Task($this->db, $this->event);
- $p = new Project($this->db, $this->event);
+ $c = new Comment($this->registry);
+ $t = new Task($this->registry);
+ $p = new Project($this->registry);
$this->assertEquals(1, $p->create(array('name' => 'test1')));
$this->assertEquals(1, $t->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 3, 'owner_id' => 1)));
@@ -51,9 +51,9 @@ class CommentTest extends Base
public function testUpdate()
{
- $c = new Comment($this->db, $this->event);
- $t = new Task($this->db, $this->event);
- $p = new Project($this->db, $this->event);
+ $c = new Comment($this->registry);
+ $t = new Task($this->registry);
+ $p = new Project($this->registry);
$this->assertEquals(1, $p->create(array('name' => 'test1')));
$this->assertEquals(1, $t->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 3, 'owner_id' => 1)));
@@ -67,7 +67,7 @@ class CommentTest extends Base
public function testValidateCreation()
{
- $c = new Comment($this->db, $this->event);
+ $c = new Comment($this->registry);
$result = $c->validateCreation(array('user_id' => 1, 'task_id' => 1, 'comment' => 'bla'));
$this->assertTrue($result[0]);
@@ -96,7 +96,7 @@ class CommentTest extends Base
public function testValidateModification()
{
- $c = new Comment($this->db, $this->event);
+ $c = new Comment($this->registry);
$result = $c->validateModification(array('id' => 1, 'comment' => 'bla'));
$this->assertTrue($result[0]);