ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTrackingTest Class Reference

Unit tests for tree table. More...

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

Public Member Functions

 testChangeEvent ()
 change event test
 testLPObjectSettings ()
 Test lp object settings.
 testLPMarks ()
 Test LP marks.
 testLPFilter ()
 Test LP filter.
 testLPCollections ()
 Test LP collections.

Protected Member Functions

 setUp ()

Protected Attributes

 $backupGlobals = FALSE

Detailed Description

Unit tests for tree table.

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

Definition at line 33 of file ilTrackingTest.php.

Member Function Documentation

ilTrackingTest::setUp ( )
protected

Definition at line 37 of file ilTrackingTest.php.

References ilUnitUtil\performInitialisation().

{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
}

+ Here is the call graph for this function:

ilTrackingTest::testChangeEvent ( )

change event test

Parameters
@return

Definition at line 48 of file ilTrackingTest.php.

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

{
global $ilUser;
include_once './Services/Tracking/classes/class.ilChangeEvent.php';
$res = ilChangeEvent::_lookupChangeState(9,$ilUser->getId());
$res = ilChangeEvent::_lookupInsideChangeState(9,$ilUser->getId());
}

+ Here is the call graph for this function:

ilTrackingTest::testLPCollections ( )

Test LP collections.

Returns

Definition at line 144 of file ilTrackingTest.php.

References ilLPCollections\_deleteAll().

{
include_once './Services/Tracking/classes/class.ilLPCollections.php';
$coll = new ilLPCollections(999);
$coll->add(888);
$coll->delete(888);
$coll->add(777);
}

+ Here is the call graph for this function:

ilTrackingTest::testLPFilter ( )

Test LP filter.

Returns

Definition at line 125 of file ilTrackingTest.php.

References $f, $filter, and ilLPFilter\_delete().

{
include_once './Services/Tracking/classes/class.ilLPFilter.php';
$filter = new ilLPFilter(9999);
$filter->setHidden(array(1));
$filter->update();
$filter = new ilLPFilter(9999);
$f = $filter->getHidden();
$this->assertEquals($f,array(1));
}

+ Here is the call graph for this function:

ilTrackingTest::testLPMarks ( )

Test LP marks.

Parameters
@return

Definition at line 97 of file ilTrackingTest.php.

References $comment, ilLPStatusManual\_getCompleted(), ilLPMarks\_lookupComment(), and ilLPMarks\deleteObject().

{
include_once './Services/Tracking/classes/class.ilLPMarks.php';
include_once './Services/Tracking/classes/class.ilLPStatusManual.php';
$marks = new ilLPMarks(999,888);
$marks->setMark('Gut');
$marks->setComment('Weiter so');
$marks->setCompleted(true);
$marks->update();
$marks = new ilLPMarks(999,888);
$mark = $marks->getMark();
$this->assertEquals($mark,'Gut');
$this->assertEquals($comment,'Weiter so');
$this->assertEquals(array(888),$completed);
}

+ Here is the call graph for this function:

ilTrackingTest::testLPObjectSettings ( )

Test lp object settings.

Definition at line 64 of file ilTrackingTest.php.

References $type, and ilLPObjSettings\_delete().

{
include_once './Services/Tracking/classes/class.ilLPObjSettings.php';
$settings = new ilLPObjSettings(9999);
$settings->setMode(127);
$settings->obj_type = "xxx";
$settings->insert();
$type = $settings->getObjType();
$this->assertEquals($type,'xxx');
$settings->setVisits(10);
$settings->update();
$visits = $settings->getVisits();
$this->assertEquals($visits,10);
$settings->cloneSettings(9998);
$settings = new ilLPObjSettings(9998);
$type = $settings->getObjType();
$this->assertEquals($type,'xxx');
}

+ Here is the call graph for this function:

Field Documentation

ilTrackingTest::$backupGlobals = FALSE
protected

Definition at line 35 of file ilTrackingTest.php.


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