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