Example #1
0
 public function testEnableDisableNotification()
 {
     $u = new User($this->container);
     $p = new Project($this->container);
     $n = new Notification($this->container);
     $pp = new ProjectPermission($this->container);
     $this->assertEquals(1, $p->create(array('name' => 'UnitTest1')));
     $this->assertEquals(2, $u->create(array('username' => 'user1')));
     $this->assertTrue($pp->addMember(1, 2));
     $this->assertEmpty($n->getUsersWithNotificationEnabled(1));
     $n->enableNotification(2);
     $this->assertNotEmpty($n->getUsersWithNotificationEnabled(1));
     $n->disableNotification(2);
     $this->assertEmpty($n->getUsersWithNotificationEnabled(1));
 }