diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-22 18:22:10 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-22 18:22:10 -0500 |
commit | 77e10d25829f3523a168bf61424fac99a539f8be (patch) | |
tree | 9b3d274146fa9543c4734a945e61b9d975960ff6 /tests/units/CommentTest.php | |
parent | 15038cdb10f8c691edc7980fd1aed32dcbed3f9f (diff) |
Improve API to return id instead of a boolean
Diffstat (limited to 'tests/units/CommentTest.php')
-rw-r--r-- | tests/units/CommentTest.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/units/CommentTest.php b/tests/units/CommentTest.php index 8846c0b8..36ff1352 100644 --- a/tests/units/CommentTest.php +++ b/tests/units/CommentTest.php @@ -17,7 +17,7 @@ class CommentTest extends Base $this->assertEquals(1, $p->create(array('name' => 'test1'))); $this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 3, 'owner_id' => 1))); - $this->assertTrue($c->create(array('task_id' => 1, 'comment' => 'bla bla', 'user_id' => 1))); + $this->assertNotFalse($c->create(array('task_id' => 1, 'comment' => 'bla bla', 'user_id' => 1))); $comment = $c->getById(1); @@ -37,9 +37,9 @@ class CommentTest extends Base $this->assertEquals(1, $p->create(array('name' => 'test1'))); $this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 3, 'owner_id' => 1))); - $this->assertTrue($c->create(array('task_id' => 1, 'comment' => 'c1', 'user_id' => 1))); - $this->assertTrue($c->create(array('task_id' => 1, 'comment' => 'c2', 'user_id' => 1))); - $this->assertTrue($c->create(array('task_id' => 1, 'comment' => 'c3', 'user_id' => 1))); + $this->assertNotFalse($c->create(array('task_id' => 1, 'comment' => 'c1', 'user_id' => 1))); + $this->assertNotFalse($c->create(array('task_id' => 1, 'comment' => 'c2', 'user_id' => 1))); + $this->assertNotFalse($c->create(array('task_id' => 1, 'comment' => 'c3', 'user_id' => 1))); $comments = $c->getAll(1); @@ -60,7 +60,7 @@ class CommentTest extends Base $this->assertEquals(1, $p->create(array('name' => 'test1'))); $this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 3, 'owner_id' => 1))); - $this->assertTrue($c->create(array('task_id' => 1, 'comment' => 'c1', 'user_id' => 1))); + $this->assertNotFalse($c->create(array('task_id' => 1, 'comment' => 'c1', 'user_id' => 1))); $this->assertTrue($c->update(array('id' => 1, 'comment' => 'bla'))); $comment = $c->getById(1); |