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);
 
   61        $obj->setTitle(
"TestObject");
 
   62        $obj->setDescription(
"TestDescription");
 
   63        $obj->setImportId(
"imp_44");
 
   65        $obj->createReference();
 
   67        $ref_id = $obj->getRefId();
 
   70        if ($obj->getType() == 
"") {
 
   73        if ($obj->getTitle() == 
"TestObject") {
 
   76        if ($obj->getDescription() == 
"TestDescription") {
 
   79        if ($obj->getImportId() == 
"imp_44") {
 
   82        if ($obj->getOwner() == 
$ilUser->getId()) {
 
   87        if ($obj->getTitle() == 
"TestObject") {
 
   91        if ($obj->getCreateDate() == ($lu = $obj->getLastUpdateDate())) {
 
   94        $obj->setTitle(
"TestObject2");
 
   99        if ($lu != ($lu2 = $obj->getLastUpdateDate())) {
 
  102        if ($obj->getTitle() == 
"TestObject2") {
 
  133        if (is_array($ar) && count($ar) == 1 && $ar[$ref_id] == $ref_id) {
 
  138        foreach ($ids as 
$i) {
 
  145        foreach ($obs as $ob) {
 
  146            if ($ob[
"obj_id"] == 
$ilUser->getId()) {
 
  156        if ($d1 != $d2 && $d1 == $d3 && $d3 == 
null) {
 
  162        $this->assertEquals(
"sg1-sg2-sg3-sg4-sg5-sg6-sg7-up1-up2-" .
 
  163            "lu1-lu2-lu3-lu4-lu5-lu6-lu7-lu8-lu9-lu10-lu11-dd1-", $value);
 
  175        $obj->setType(
"xxx");
 
  176        $obj->setTitle(
"TestObject");
 
  177        $obj->setDescription(
"TestDescription");
 
  178        $obj->setImportId(
"imp_44");
 
  180        $obj->createReference();
 
  182        $ref_id = $obj->getRefId();
 
  185        $obj->putInTree(ROOT_FOLDER_ID);
 
  186        $obj->setPermissions(ROOT_FOLDER_ID);
 
  187        if (
$tree->isInTree($ref_id)) {
 
  195        $tree->useCache(
false);
 
  197        $tree->saveSubTree($ref_id, 
true);
 
  198        if (
$tree->isDeleted($ref_id)) {
 
  201        if (
$tree->isSaved($ref_id)) {
 
  211        $saved_tree = 
new ilTree(-(
int) $ref_id);
 
  212        $node_data = $saved_tree->getNodeData($ref_id);
 
  213        $saved_tree->deleteTree($node_data);
 
  220        foreach ($obs as $ob) {
 
  228        $this->assertEquals(
"tree1-tree2-tree3-tree4-tree5-tree6-tree7-", $value);
 
  237        include_once 
'./Services/Object/classes/class.ilObject.php';
 
  244        $this->assertEquals($date, 
null);
 
An exception for terminatinating execution or to throw for unit testing.
@group needsInstalledILIAS
testCreationDeletion()
@group IL_Init
testSetGetLookup()
@group IL_Init
testTreeTrash()
@group IL_Init
testObjectReference()
test object reference queries @group IL_Init
Class ilObject Basic functions for all objects.
static _lookupOwnerName($a_owner_id)
lookup owner name for owner id
static _lookupObjId($a_id)
static _resetDeletedDate($a_ref_id)
only called in ilObjectGUI::insertSavedNodes
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
static _getObjectsByType($a_obj_type="", $a_owner="")
Get objects by type.
static _lookupDescription($a_id)
lookup object description
static _setDeletedDate($a_ref_id)
only called in ilTree::saveSubTree
static _getAllReferences($a_id)
get all reference ids of object
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _hasUntrashedReference($a_obj_id)
checks wether an object has at least one reference that is not in trash
static _lookupObjIdByImportId($a_import_id)
static _lookupDeletedDate($a_ref_id)
only called in ilObjectGUI::insertSavedNodes
static _lookupLastUpdate($a_id, $a_as_string=false)
lookup last update
static _lookupOwner($a_id)
lookup object owner
static _isInTrash($a_ref_id)
checks wether object is in trash
static _lookupType($a_id, $a_reference=false)
lookup object type
static _getIdsForTitle($title, $type='', $partialmatch=false)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
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,...
if(!array_key_exists('StateId', $_REQUEST)) $id