2 include_once(
"./Services/Exceptions/classes/class.ilException.php");
3 include_once(
"./Services/Database/classes/MDB2/class.ilDBInnoDB.php");
22 PHPUnit_Framework_Error_Deprecated::$enabled = FALSE;
27 require_once(
"./Modules/DataCollection/classes/class.ilObjDataCollection.php");
29 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
30 ilUnitUtil::performInitialisation();
32 $this->root_object->setTitle(
'DataCollection');
34 $this->root_object->create();
35 $this->root_object->createReference();
36 $this->root_object_obj_id = $this->root_object->getId();
37 $this->root_object_ref_id = $this->root_object->getRefId();
38 $this->root_object->putInTree(ROOT_FOLDER_ID);
47 $objDefinition = $DIC[
'objDefinition'];
48 $this->obj_definition = $objDefinition;
53 if ($this->root_object) {
54 $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));
72 $tables = $this->root_object->getTables();
73 $this->assertEquals(count($tables), 1);
75 $table = array_shift($tables);
76 $this->assertTrue($table instanceof
ilDclTable);
85 $this->assertEquals($table->
getTitle(), $this->root_object->getTitle());
90 $this->assertEquals(count($table->
getFields()), count($table->getStandardFields()));
92 $this->assertTrue($this->root_object->_hasTableByTitle($this->root_object->getTitle(), $this->root_object_obj_id));
101 $this->assertEquals(count($tableviews), 1);
103 $tableview = array_shift($tableviews);
105 return array(
'table' => $table,
'tableview' => $tableview);
113 $this->assertEquals($array[
'tableview']->getTable(), $array[
'table']);
115 $this->assertEquals($array[
'tableview']->getOrder(), 10);
122 $field_settings = $array[
'tableview']->getFieldSettings();
125 foreach($array[
'table']->getFields() as $field) {
126 $f_sets = $field->getFieldSettings();
127 $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
Create styles array
The data for the language used.
testDefaultTableCreated()
Class ilObjDataCollection.