ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilIndividualAssessmentSettingsTest Class Reference

disabled needsInstalledILIAS More...

+ Inheritance diagram for ilIndividualAssessmentSettingsTest:
+ Collaboration diagram for ilIndividualAssessmentSettingsTest:

Public Member Functions

 test_create_settings ()
 
 test_settings_change ($settings)
 test_create_settings More...
 
 test_settings_load ()
 test_settings_change More...
 
 test_settings_update ()
 test_settings_load More...
 
 test_settings_delete ($settings)
 test_settings_update More...
 

Static Public Member Functions

static setUpBeforeClass ()
 

Static Public Attributes

static $iass
 
static $iass_id
 
static $storage
 
static $db
 

Detailed Description

disabled needsInstalledILIAS

Definition at line 11 of file ilIndividualAssessmentSettingsTest.php.

Member Function Documentation

◆ setUpBeforeClass()

static ilIndividualAssessmentSettingsTest::setUpBeforeClass ( )
static

Definition at line 18 of file ilIndividualAssessmentSettingsTest.php.

References $ilDB, and ilObject\setTitle().

19  {
20  PHPUnit_Framework_Error_Deprecated::$enabled = false;
21  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
22  ilUnitUtil::performInitialisation();
23  self::$iass = new ilObjIndividualAssessment;
24  self::$iass ->setTitle("iass_test");
25  self::$iass ->setDescription("iass_test_desc");
26  self::$iass ->create();
27  self::$iass ->createReference();
28  self::$iass ->putInTree(ROOT_FOLDER_ID);
29  self::$iass_id = self::$iass->getId();
30  global $ilDB;
31  self::$storage = new ilIndividualAssessmentSettingsStorageDB($ilDB);
32  }
For the purpose of streamlining the grading and learning-process status definition outside of tests...
A settings storage handler to write iass settings to db.
setTitle($a_title)
set object title
global $ilDB
+ Here is the call graph for this function:

◆ test_create_settings()

ilIndividualAssessmentSettingsTest::test_create_settings ( )

Definition at line 35 of file ilIndividualAssessmentSettingsTest.php.

References ilIndividualAssessmentSettings\DEF_CONTENT, and ilIndividualAssessmentSettings\DEF_RECORD_TEMPLATE.

36  {
37  $settings = self::$storage->loadSettings(self::$iass);
38  $content = $settings->content();
39  $record_template = $settings->recordTemplate();
40  $this->assertEquals($content, ilIndividualAssessmentSettings::DEF_CONTENT);
41  $this->assertEquals($record_template, ilIndividualAssessmentSettings::DEF_RECORD_TEMPLATE);
42  return $settings;
43  }

◆ test_settings_change()

ilIndividualAssessmentSettingsTest::test_settings_change (   $settings)

test_create_settings

Definition at line 48 of file ilIndividualAssessmentSettingsTest.php.

49  {
50  $settings = $settings->setContent('some_content')->setRecordTemplate('some_template');
51  $this->assertEquals($settings->content(), 'some_content');
52  $this->assertEquals($settings->recordTemplate(), 'some_template');
53  self::$storage->updateSettings($settings);
54  }

◆ test_settings_delete()

ilIndividualAssessmentSettingsTest::test_settings_delete (   $settings)

test_settings_update

Definition at line 89 of file ilIndividualAssessmentSettingsTest.php.

90  {
91  self::$iass->delete();
92  $settings = self::$storage->loadSettings(self::$iass);
93  $this->assertEquals($settings->content(), '');
94  $this->assertEquals($settings->recordTemplate(), '');
95  }

◆ test_settings_load()

ilIndividualAssessmentSettingsTest::test_settings_load ( )

test_settings_change

Definition at line 59 of file ilIndividualAssessmentSettingsTest.php.

60  {
61  $settings = self::$storage->loadSettings(self::$iass);
62  $this->assertEquals($settings->content(), 'some_content');
63  $this->assertEquals($settings->recordTemplate(), 'some_template');
64  return $settings;
65  }

◆ test_settings_update()

ilIndividualAssessmentSettingsTest::test_settings_update ( )

test_settings_load

Definition at line 70 of file ilIndividualAssessmentSettingsTest.php.

References $iass.

71  {
72  $iass = new ilObjIndividualAssessment(self::$iass_id, false);
73  $settings = $iass->getSettings();
74  $this->assertEquals($settings->content(), 'some_content');
75  $this->assertEquals($settings->recordTemplate(), 'some_template');
76  $settings = $settings->setContent('some_content2')->setRecordTemplate('some_template2');
77  $iass->update();
78  $iass = new ilObjIndividualAssessment(self::$iass_id, false);
79  $settings = $iass->getSettings();
80  $this->assertEquals($settings->content(), 'some_content2');
81  $this->assertEquals($settings->recordTemplate(), 'some_template2');
82  return $settings;
83  }
For the purpose of streamlining the grading and learning-process status definition outside of tests...

Field Documentation

◆ $db

ilIndividualAssessmentSettingsTest::$db
static

Definition at line 16 of file ilIndividualAssessmentSettingsTest.php.

◆ $iass

ilIndividualAssessmentSettingsTest::$iass
static

Definition at line 13 of file ilIndividualAssessmentSettingsTest.php.

Referenced by test_settings_update().

◆ $iass_id

ilIndividualAssessmentSettingsTest::$iass_id
static

Definition at line 14 of file ilIndividualAssessmentSettingsTest.php.

◆ $storage

ilIndividualAssessmentSettingsTest::$storage
static

Definition at line 15 of file ilIndividualAssessmentSettingsTest.php.


The documentation for this class was generated from the following file: