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))
50 $this->assertEquals(
"create1-create2-create3-", $value);
62 $obj->setTitle(
"TestObject");
63 $obj->setDescription(
"TestDescription");
64 $obj->setImportId(
"imp_44");
66 $obj->createReference();
71 if ($obj->getType() ==
"")
75 if ($obj->getTitle() ==
"TestObject")
79 if ($obj->getDescription() ==
"TestDescription")
83 if ($obj->getImportId() ==
"imp_44")
87 if ($obj->getOwner() == $ilUser->getId())
93 if ($obj->getTitle() ==
"TestObject")
98 if ($obj->getCreateDate() == ($lu = $obj->getLastUpdateDate()))
102 $obj->setTitle(
"TestObject2");
107 if ($lu != ($lu2 = $obj->getLastUpdateDate()))
111 if ($obj->getTitle() ==
"TestObject2")
166 foreach ($obs as $ob)
168 if ($ob[
"obj_id"] == $ilUser->getId())
179 if ($d1 != $d2 && $d1 == $d3 && $d3 == null)
186 $this->assertEquals(
"sg1-sg2-sg3-sg4-sg5-sg6-sg7-up1-up2-".
187 "lu1-lu2-lu3-lu4-lu5-lu6-lu7-lu8-lu9-lu10-lu11-dd1-", $value);
198 $obj->setType(
"xxx");
199 $obj->setTitle(
"TestObject");
200 $obj->setDescription(
"TestDescription");
201 $obj->setImportId(
"imp_44");
203 $obj->createReference();
208 $obj->putInTree(ROOT_FOLDER_ID);
209 $obj->setPermissions(ROOT_FOLDER_ID);
220 $tree->useCache(
false);
222 $tree->saveSubTree(
$ref_id,
true);
241 $node_data = $saved_tree->getNodeData($ref_id);
242 $saved_tree->deleteTree($node_data);
250 foreach ($obs as $ob)
260 $this->assertEquals(
"tree1-tree2-tree3-tree4-tree5-tree6-tree7-", $value);
270 include_once
'./Services/Object/classes/class.ilObject.php';
277 $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
Class ilObject Basic functions for all objects.
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.
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)