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/NotificationTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/units/NotificationTest.php') diff --git a/tests/units/NotificationTest.php b/tests/units/NotificationTest.php index 770a9829..d8e623e1 100644 --- a/tests/units/NotificationTest.php +++ b/tests/units/NotificationTest.php @@ -19,16 +19,16 @@ class NotificationTest extends Base $this->assertEquals(1, $p->create(array('name' => 'UnitTest1'))); // Email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user1', 'email' => 'user1@here', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user1', 'email' => 'user1@here', 'notifications_enabled' => 1))); // No email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user2', 'email' => '', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user2', 'email' => '', 'notifications_enabled' => 1))); // Email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user3', 'email' => 'user3@here', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user3', 'email' => 'user3@here', 'notifications_enabled' => 1))); // No email + notifications disabled - $this->assertTrue($u->create(array('username' => 'user4'))); + $this->assertNotFalse($u->create(array('username' => 'user4'))); // Nobody is member of any projects $this->assertEmpty($pp->getMembers(1)); @@ -61,16 +61,16 @@ class NotificationTest extends Base $this->assertEquals(3, $p->create(array('name' => 'UnitTest3', 'is_everybody_allowed' => 1))); // Email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user1', 'email' => 'user1@here', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user1', 'email' => 'user1@here', 'notifications_enabled' => 1))); // No email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user2', 'email' => '', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user2', 'email' => '', 'notifications_enabled' => 1))); // Email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user3', 'email' => 'user3@here', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user3', 'email' => 'user3@here', 'notifications_enabled' => 1))); // No email + notifications disabled - $this->assertTrue($u->create(array('username' => 'user4'))); + $this->assertNotFalse($u->create(array('username' => 'user4'))); // We allow all users to be member of our projects $this->assertTrue($pp->allowUser(1, 1)); -- cgit v1.2.3