ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCourseTest Class Reference
+ Inheritance diagram for ilCourseTest:
+ Collaboration diagram for ilCourseTest:

Public Member Functions

 testMemberAgreement ()
 Test member agreement.

Protected Member Functions

 setUp ()

Protected Attributes

 $backupGlobals = FALSE

Detailed Description

Definition at line 24 of file ilCourseTest.php.

Member Function Documentation

ilCourseTest::setUp ( )
protected

Definition at line 28 of file ilCourseTest.php.

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

Test member agreement.

Definition at line 37 of file ilCourseTest.php.

References ilMemberAgreement\_deleteByUser(), ilMemberAgreement\_hasAccepted(), ilMemberAgreement\_hasAgreements(), and ilMemberAgreement\_hasAgreementsByObjId().

{
include_once 'Services/Membership/classes/class.ilMemberAgreement.php';
global $ilDB;
$agree = new ilMemberAgreement(9999,8888);
$agree->read();
$agree->setAccepted(true);
$agree->save();
$agree = new ilMemberAgreement(9999,8888);
$agree->read();
$sta = $agree->isAccepted();
$this->assertEquals($sta,true);
$agree->delete();
$agree = new ilMemberAgreement(9999,8888);
$agree->read();
$sta = $agree->isAccepted();
$this->assertEquals($sta,false);
$this->assertEquals($sta,false);
$agree = new ilMemberAgreement(9999,8888);
$agree->read();
$agree->setAccepted(true);
$agree->save();
$this->assertEquals($sta,true);
$this->assertEquals($sta,true);
}

+ Here is the call graph for this function:

Field Documentation

ilCourseTest::$backupGlobals = FALSE
protected

Definition at line 26 of file ilCourseTest.php.


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