summaryrefslogtreecommitdiff
path: root/tests/units/CommentTest.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-14 22:44:25 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-14 22:44:25 -0500
commitb081288188bb1744c9d7bd075aa5936e0ccbb9c4 (patch)
tree68008e35eb129f74b9b2a49f6f6076ed02b601c6 /tests/units/CommentTest.php
parent1487cb27634161ef558c367150213bc7077e4198 (diff)
Use Pimple instead of Core\Registry and add Monolog for logging
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]);