2 include_once(
"./Services/Exceptions/classes/class.ilException.php");
21 PHPUnit_Framework_Error_Deprecated::$enabled =
false;
26 require_once(
"./Modules/DataCollection/classes/class.ilObjDataCollection.php");
28 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
29 ilUnitUtil::performInitialisation();
31 $this->root_object->setTitle(
'DataCollection');
33 $this->root_object->create();
34 $this->root_object->createReference();
35 $this->root_object_obj_id = $this->root_object->getId();
36 $this->root_object_ref_id = $this->root_object->getRefId();
37 $this->root_object->putInTree(ROOT_FOLDER_ID);
46 $objDefinition = $DIC[
'objDefinition'];
47 $this->obj_definition = $objDefinition;
52 if ($this->root_object) {
53 $this->root_object->delete();
62 $this->assertNotEmpty($this->root_object_obj_id);
63 $this->assertGreaterThan(0, $this->root_object_obj_id);
65 $this->assertNotEmpty($this->root_object_ref_id);
66 $this->assertGreaterThan(0, $this->root_object_ref_id);
68 $this->assertTrue($this->tree->isInTree($this->root_object_ref_id));
73 $tables = $this->root_object->getTables();
74 $this->assertEquals(count($tables), 1);
76 $table = array_shift($tables);
87 $this->assertEquals($table->
getTitle(), $this->root_object->getTitle());
92 $this->assertEquals(count($table->
getFields()), count($table->getStandardFields()));
94 $this->assertTrue($this->root_object->_hasTableByTitle($this->root_object->getTitle(), $this->root_object_obj_id));
103 $this->assertEquals(count($tableviews), 1);
105 $tableview = array_shift($tableviews);
107 return array(
'table' => $table,
'tableview' => $tableview);
116 $this->assertEquals($array[
'tableview']->getTable(), $array[
'table']);
118 $this->assertEquals($array[
'tableview']->getOrder(), 10);
126 $field_settings = $array[
'tableview']->getFieldSettings();
129 foreach ($array[
'table']->getFields() as $field) {
130 $f_sets = $field->getFieldSettings();
131 $this->assertNotEmpty($f_sets);
testCreation()
Test creation of ilObjStudyProgramme.
testDefaultTableViewCreated(ilDclTable $table)
testDefaultTableCreated
Class ilObjDataCollectionTest needsInstalledILIAS.
getPublicCommentsEnabled()
testDefaultTableView(array $array)
testDefaultTableViewCreated
static getAllForTableId($table_id)
getFields()
Returns all fields of this table including the standard fields.
Class ilDclBaseFieldModel.
testDefaultTable(ilDclTable $table)
testDefaultTableCreated
getRecordFields()
Returns all fields of this table which are NOT standard fields.
testDefaultTableViewFieldSettings(array $array)
testDefaultTableViewCreated
testDefaultTableCreated()
if(empty($password)) $table
Class ilObjDataCollection.