From 4d007ec39fe808c28fe08516afe549aa5d0aeb42 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 22 Nov 2014 19:15:50 -0500 Subject: addColumn() return the column_id now --- tests/functionals/ApiTest.php | 6 +++++- tests/units/BoardTest.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/functionals/ApiTest.php b/tests/functionals/ApiTest.php index 3b1c5241..ece7b46d 100644 --- a/tests/functionals/ApiTest.php +++ b/tests/functionals/ApiTest.php @@ -135,7 +135,11 @@ class Api extends PHPUnit_Framework_TestCase public function testAddColumn() { - $this->assertTrue($this->client->addColumn(1, 'New column')); + $column_id = $this->client->addColumn(1, 'New column'); + + $this->assertNotFalse($column_id); + $this->assertInternalType('int', $column_id); + $this->assertTrue($column_id > 0); $columns = $this->client->getColumns(1); $this->assertTrue(is_array($columns)); diff --git a/tests/units/BoardTest.php b/tests/units/BoardTest.php index b83fee85..a7de34bd 100644 --- a/tests/units/BoardTest.php +++ b/tests/units/BoardTest.php @@ -111,8 +111,8 @@ class BoardTest extends Base $b = new Board($this->container); $this->assertEquals(1, $p->create(array('name' => 'UnitTest1'))); - $this->assertTrue($b->addColumn(1, 'another column')); - $this->assertTrue($b->addColumn(1, 'one more', 3)); + $this->assertNotFalse($b->addColumn(1, 'another column')); + $this->assertNotFalse($b->addColumn(1, 'one more', 3)); $columns = $b->getColumns(1); $this->assertTrue(is_array($columns)); -- cgit v1.2.3