ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMembershipTest Class Reference

Unit tests for tree table. More...

+ Inheritance diagram for ilMembershipTest:
+ Collaboration diagram for ilMembershipTest:

Public Member Functions

 testMembership ()
 Waiting list tes IL_Init.
 testSubscription ()
 IL_Init

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 ilMembershipTest.php.

Member Function Documentation

ilMembershipTest::setUp ( )
protected

Definition at line 37 of file ilMembershipTest.php.

{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
ilMembershipTest::testMembership ( )

Waiting list tes IL_Init.

Parameters
@return

Definition at line 49 of file ilMembershipTest.php.

References $ret, ilWaitingList\_deleteAll(), and ilWaitingList\_deleteUser().

{
include_once './Services/Membership/classes/class.ilWaitingList.php';
include_once './Modules/Course/classes/class.ilCourseWaitingList.php';
$wait = new ilCourseWaitingList(999999);
$ret = $wait->addToList(111111);
$this->assertEquals($ret,true);
$wait->updateSubscriptionTime(111111,time());
$wait->removeFromList(111111);
$wait->addToList(111111);
$ret = $wait->isOnList(111111);
$this->assertEquals($ret,true);
$wait->addToList(111111);
$wait->addToList(111111);
}

+ Here is the call graph for this function:

ilMembershipTest::testSubscription ( )

IL_Init

Parameters
@return

Definition at line 77 of file ilMembershipTest.php.

References ilCourseParticipants\_getInstanceByObjId(), and ilParticipants\_isSubscriber().

{
include_once './Services/Membership/classes/class.ilParticipants.php';
include_once './Modules/Course/classes/class.ilCourseParticipants.php';
$part->addSubscriber(111111);
$part->updateSubscriptionTime(111111,time());
$part->updateSubject(111111,'hallo');
$is = $part->isSubscriber(111111);
$this->assertEquals($is,true);
$is = ilParticipants::_isSubscriber(999999,111111);
$this->assertEquals($is,true);
$part->deleteSubscriber(111111);
$is = $part->isSubscriber(111111);
$this->assertEquals($is,false);
}

+ Here is the call graph for this function:

Field Documentation

ilMembershipTest::$backupGlobals = FALSE
protected

Definition at line 35 of file ilMembershipTest.php.


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