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.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/units/CommentTest.php b/tests/units/CommentTest.php
index 31c46996..f784382a 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->registry);
- $t = new Task($this->registry);
- $p = new Project($this->registry);
+ $c = new Comment($this->container);
+ $t = new Task($this->container);
+ $p = new Project($this->container);
$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->registry);
- $t = new Task($this->registry);
- $p = new Project($this->registry);
+ $c = new Comment($this->container);
+ $t = new Task($this->container);
+ $p = new Project($this->container);
$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)));
@@ -53,9 +53,9 @@ class CommentTest extends Base
public function testUpdate()
{
- $c = new Comment($this->registry);
- $t = new Task($this->registry);
- $p = new Project($this->registry);
+ $c = new Comment($this->container);
+ $t = new Task($this->container);
+ $p = new Project($this->container);
$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)));
@@ -69,9 +69,9 @@ class CommentTest extends Base
public function validateRemove()
{
- $c = new Comment($this->registry);
- $t = new Task($this->registry);
- $p = new Project($this->registry);
+ $c = new Comment($this->container);
+ $t = new Task($this->container);
+ $p = new Project($this->container);
$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)));
@@ -84,7 +84,7 @@ class CommentTest extends Base
public function testValidateCreation()
{
- $c = new Comment($this->registry);
+ $c = new Comment($this->container);
$result = $c->validateCreation(array('user_id' => 1, 'task_id' => 1, 'comment' => 'bla'));
$this->assertTrue($result[0]);
@@ -113,7 +113,7 @@ class CommentTest extends Base
public function testValidateModification()
{
- $c = new Comment($this->registry);
+ $c = new Comment($this->container);
$result = $c->validateModification(array('id' => 1, 'comment' => 'bla'));
$this->assertTrue($result[0]);