/** * Link check test * @param * @return */ public function testLinkCheck() { global $ilDB; include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php'; $not = new ilLinkCheckNotify($ilDB); $not->setObjId(99999); $not->setUserId(13); $ret = $not->addNotifier(); $this->assertEquals($ret, true); $status = ilLinkCheckNotify::_getNotifyStatus(13, 99999); $this->assertEquals($status, true); $notifiers = ilLinkCheckNotify::_getNotifiers(99999); $this->assertEquals($notifiers, array(13)); $del = ilLinkCheckNotify::_deleteObject(99999); $this->assertEquals($del, true); }
/** * delete object and all related data * * @access public * @return boolean true if all object data were removed; false if only a references were removed */ function delete() { // always call parent delete function first!! if (!parent::delete()) { return false; } // delete items include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php'; ilLinkResourceItems::_deleteAll($this->getId()); // Delete notify entries include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php'; ilLinkCheckNotify::_deleteObject($this->getId()); // delete meta data $this->deleteMetaData(); return true; }