From 77e10d25829f3523a168bf61424fac99a539f8be Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 22 Nov 2014 18:22:10 -0500 Subject: Improve API to return id instead of a boolean --- tests/units/CommentTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/units/CommentTest.php') 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); -- cgit v1.2.3