ILIAS  Release_4_0_x_branch Revision 61816
 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.

References ilUnitUtil\performInitialisation().

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

+ Here is the call graph for this function:

ilCourseTest::testMemberAgreement ( )

Test member agreement.

Definition at line 37 of file ilCourseTest.php.

References $ilDB, ilCourseAgreement\_deleteByUser(), ilCourseAgreement\_hasAccepted(), ilCourseAgreement\_hasAgreements(), and ilCourseAgreement\_hasAgreementsByObjId().

{
include_once './Modules/Course/classes/class.ilCourseAgreement.php';
global $ilDB;
$agree = new ilCourseAgreement(9999,8888);
$agree->read();
$agree->setAccepted(true);
$agree->save();
$agree = new ilCourseAgreement(9999,8888);
$agree->read();
$sta = $agree->isAccepted();
$this->assertEquals($sta,true);
$agree->delete();
$agree = new ilCourseAgreement(9999,8888);
$agree->read();
$sta = $agree->isAccepted();
$this->assertEquals($sta,false);
$this->assertEquals($sta,false);
$agree = new ilCourseAgreement(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: