public function testFilterAssignee() { $u = new User($this->container); $n = new Notification($this->container); $this->assertEquals(2, $u->create(array('username' => 'user1', 'notifications_filter' => Notification::FILTER_ASSIGNEE))); $this->assertTrue($n->filterAssignee($u->getById(2), array('task' => array('owner_id' => 2)))); $this->assertEquals(3, $u->create(array('username' => 'user2', 'notifications_filter' => Notification::FILTER_ASSIGNEE))); $this->assertFalse($n->filterAssignee($u->getById(3), array('task' => array('owner_id' => 1)))); $this->assertEquals(4, $u->create(array('username' => 'user3', 'notifications_filter' => Notification::FILTER_NONE))); $this->assertFalse($n->filterAssignee($u->getById(4), array('task' => array('owner_id' => 2)))); }