ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilTrackingTest Class Reference

Unit tests for tree table needsInstalledILIAS. More...

+ Inheritance diagram for ilTrackingTest:
+ Collaboration diagram for ilTrackingTest:

Public Member Functions

 testChangeEvent ()
 change event test IL_Init More...
 
 testLPMarks ()
 Test lp object settings. More...
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $backupGlobals = FALSE
 

Detailed Description

Unit tests for tree table needsInstalledILIAS.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 34 of file ilTrackingTest.php.

Member Function Documentation

◆ setUp()

ilTrackingTest::setUp ( )
protected

Definition at line 38 of file ilTrackingTest.php.

39  {
40  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
41  ilUnitUtil::performInitialisation();
42  }

◆ testChangeEvent()

ilTrackingTest::testChangeEvent ( )

change event test IL_Init

Parameters

Definition at line 50 of file ilTrackingTest.php.

References $ilUser, $res, $ret, ilChangeEvent\_activate(), ilChangeEvent\_deactivate(), ilChangeEvent\_lookupChangeState(), and ilChangeEvent\_lookupUncaughtWriteEvents().

51  {
52  global $ilUser;
53 
54  include_once './Services/Tracking/classes/class.ilChangeEvent.php';
57 
58  $res = ilChangeEvent::_lookupUncaughtWriteEvents(9,$ilUser->getId());
59  $res = ilChangeEvent::_lookupChangeState(9,$ilUser->getId());
60  }
static _activate()
Activates change event tracking.
$ilUser
Definition: imgupload.php:18
static _lookupUncaughtWriteEvents($obj_id, $usr_id)
Catches up with all write events which occured before the specified timestamp.
static _deactivate()
Deactivates change event tracking.
$ret
Definition: parser.php:6
static _lookupChangeState($obj_id, $usr_id)
Returns the change state of the object for the specified user.
+ Here is the call graph for this function:

◆ testLPMarks()

ilTrackingTest::testLPMarks ( )

Test lp object settings.

Test LP marks IL_Init

Parameters

Definition at line 102 of file ilTrackingTest.php.

References $comment, ilLPStatusFactory\_getClassById(), ilLPMarks\_lookupComment(), array, ilLPMarks\deleteObject(), and ilLPObjSettings\LP_MODE_MANUAL.

103  {
104  include_once './Services/Tracking/classes/class.ilLPMarks.php';
105  include_once './Services/Tracking/classes/class.ilLPStatusFactory.php';
106 
107  $marks = new ilLPMarks(999,888);
108  $marks->setMark('Gut');
109  $marks->setComment('Weiter so');
110  $marks->setCompleted(true);
111  $marks->update();
112 
113  $marks = new ilLPMarks(999,888);
114  $mark = $marks->getMark();
115  $this->assertEquals($mark,'Gut');
116 
118  $this->assertEquals($comment,'Weiter so');
119 
121  $completed = $class::_getCompleted(999);
122  $this->assertEquals(array(888),$completed);
123 
125  }
static _getClassById($a_obj_id, $a_mode=NULL)
$comment
Definition: buildRTE.php:83
Create styles array
The data for the language used.
static deleteObject($a_obj_id)
Delete object.
static _lookupComment($a_usr_id, $a_obj_id)
+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilTrackingTest::$backupGlobals = FALSE
protected

Definition at line 36 of file ilTrackingTest.php.


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