12 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
13 ilUnitUtil::performInitialisation();
27 $obj2->setType(
"xxx");
29 $id2 = $obj2->getId();
31 if ($id2 == (
$id + 1)) {
47 $this->assertEquals(
"create1-create2-create3-", $value);
59 $obj->setTitle(
"TestObject");
60 $obj->setDescription(
"TestDescription");
61 $obj->setImportId(
"imp_44");
63 $obj->createReference();
65 $ref_id = $obj->getRefId();
68 if ($obj->getType() ==
"") {
71 if ($obj->getTitle() ==
"TestObject") {
74 if ($obj->getDescription() ==
"TestDescription") {
77 if ($obj->getImportId() ==
"imp_44") {
80 if ($obj->getOwner() == $ilUser->getId()) {
85 if ($obj->getTitle() ==
"TestObject") {
89 if ($obj->getCreateDate() == ($lu = $obj->getLastUpdateDate())) {
92 $obj->setTitle(
"TestObject2");
97 if ($lu != ($lu2 = $obj->getLastUpdateDate())) {
100 if ($obj->getTitle() ==
"TestObject2") {
131 if (is_array($ar) && count($ar) == 1 && $ar[$ref_id] == $ref_id) {
136 foreach ($ids as
$i) {
143 foreach ($obs as $ob) {
144 if ($ob[
"obj_id"] == $ilUser->getId()) {
154 if ($d1 != $d2 && $d1 == $d3 && $d3 == null) {
160 $this->assertEquals(
"sg1-sg2-sg3-sg4-sg5-sg6-sg7-up1-up2-" .
161 "lu1-lu2-lu3-lu4-lu5-lu6-lu7-lu8-lu9-lu10-lu11-dd1-", $value);
172 $obj->setType(
"xxx");
173 $obj->setTitle(
"TestObject");
174 $obj->setDescription(
"TestDescription");
175 $obj->setImportId(
"imp_44");
177 $obj->createReference();
179 $ref_id = $obj->getRefId();
182 $obj->putInTree(ROOT_FOLDER_ID);
183 $obj->setPermissions(ROOT_FOLDER_ID);
184 if ($tree->isInTree($ref_id)) {
192 $tree->useCache(
false);
194 $tree->saveSubTree($ref_id,
true);
195 if ($tree->isDeleted($ref_id)) {
198 if ($tree->isSaved($ref_id)) {
208 $saved_tree =
new ilTree(-(
int) $ref_id);
209 $node_data = $saved_tree->getNodeData($ref_id);
210 $saved_tree->deleteTree($node_data);
217 foreach ($obs as $ob) {
225 $this->assertEquals(
"tree1-tree2-tree3-tree4-tree5-tree6-tree7-", $value);
234 include_once
'./Services/Object/classes/class.ilObject.php';
241 $this->assertEquals($date, null);
static _resetDeletedDate($a_ref_id)
only called in ilObjectGUI::insertSavedNodes
static _lookupDeletedDate($a_ref_id)
only called in ilObjectGUI::insertSavedNodes
static _hasUntrashedReference($a_obj_id)
checks wether an object has at least one reference that is not in trash
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
static _getObjectsByOperations($a_obj_type, $a_operation, $a_usr_id=0, $limit=0)
Get all objects of a specific type and check access This function is not recursive, instead it parses the serialized rbac_pa entries.
if(!array_key_exists('StateId', $_REQUEST)) $id
static _isInTrash($a_ref_id)
checks wether object is in trash
static _lookupTitle($a_id)
lookup object title
static _getObjectsByType($a_obj_type="", $a_owner="")
Get objects by type.
static _setDeletedDate($a_ref_id)
only called in ilTree::saveSubTree
static _getAllReferences($a_id)
get all reference ids of object
static _lookupLastUpdate($a_id, $a_as_string=false)
lookup last update
testObjectReference()
test object reference queries IL_Init
static _lookupObjectId($a_ref_id)
lookup object id
static _lookupDescription($a_id)
lookup object description
static _lookupObjId($a_id)
testCreationDeletion()
IL_Init
static _lookupOwner($a_id)
lookup object owner
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static _lookupType($a_id, $a_reference=false)
lookup object type
testSetGetLookup()
IL_Init
static _getIdsForTitle($title, $type='', $partialmatch=false)
static _lookupOwnerName($a_owner_id)
lookup owner name for owner id
static _lookupObjIdByImportId($a_import_id)