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/UserTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/units/UserTest.php') diff --git a/tests/units/UserTest.php b/tests/units/UserTest.php index ebb76a92..6e535a35 100644 --- a/tests/units/UserTest.php +++ b/tests/units/UserTest.php @@ -73,8 +73,8 @@ class UserTest extends Base public function testCreate() { $u = new User($this->container); - $this->assertTrue($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto'))); - $this->assertTrue($u->create(array('username' => 'titi', 'is_ldap_user' => 1))); + $this->assertNotFalse($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto'))); + $this->assertNotFalse($u->create(array('username' => 'titi', 'is_ldap_user' => 1))); $this->assertFalse($u->create(array('username' => 'toto'))); $user = $u->getById(1); @@ -105,7 +105,7 @@ class UserTest extends Base public function testUpdate() { $u = new User($this->container); - $this->assertTrue($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto'))); + $this->assertNotFalse($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto'))); $this->assertTrue($u->update(array('id' => 2, 'username' => 'biloute'))); $user = $u->getById(2); @@ -124,7 +124,7 @@ class UserTest extends Base $tf = new TaskFinder($this->container); $p = new Project($this->container); - $this->assertTrue($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto'))); + $this->assertNotFalse($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto'))); $this->assertEquals(1, $p->create(array('name' => 'Project #1'))); $this->assertEquals(1, $tc->create(array('title' => 'Task #1', 'project_id' => 1, 'owner_id' => 2))); -- cgit v1.2.3