ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilStudyProgrammeAssignmentTest Class Reference
+ Inheritance diagram for ilStudyProgrammeAssignmentTest:
+ Collaboration diagram for ilStudyProgrammeAssignmentTest:

Public Member Functions

 testPRGAssignmentInitAndId ()
 
 testPRGAssignmentProperties ()
 

Protected Attributes

 $backupGlobals = false
 

Detailed Description

Definition at line 23 of file ilStudyProgrammeAssignmentTest.php.

Member Function Documentation

◆ testPRGAssignmentInitAndId()

ilStudyProgrammeAssignmentTest::testPRGAssignmentInitAndId ( )

Definition at line 27 of file ilStudyProgrammeAssignmentTest.php.

27 : void
28 {
29 $ass = new ilPRGAssignment(123, 6);
30 $this->assertEquals($ass->getId(), 123);
31 $this->assertEquals($ass->getUserId(), 6);
32 }
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...

◆ testPRGAssignmentProperties()

ilStudyProgrammeAssignmentTest::testPRGAssignmentProperties ( )

Definition at line 34 of file ilStudyProgrammeAssignmentTest.php.

34 : void
35 {
36 $ass = new ilPRGAssignment(123, 456);
37 $now = new DateTimeImmutable();
38
39 $ass = $ass->withLastChange(6, $now);
40 $this->assertEquals($ass->getLastChangeBy(), 6);
41 $this->assertEquals($ass->getLastChange()->format(ilPRGAssignment::DATE_TIME_FORMAT), $now->format(ilPRGAssignment::DATE_TIME_FORMAT));
42
43 $this->assertFalse($ass->withManuallyAssigned(false)->isManuallyAssigned());
44 $this->assertTrue($ass->withManuallyAssigned(true)->isManuallyAssigned());
45
46 $dl = DateTimeImmutable::createFromFormat('Ymd', '20201001');
47 $ass = $ass->withRestarted(321, $dl);
48 $this->assertEquals($ass->getRestartDate()->format('Ymd'), '20201001');
49 $this->assertEquals($ass->getRestartedAssignmentId(), 321);
50 }

References ilPRGAssignment\DATE_TIME_FORMAT.

Field Documentation

◆ $backupGlobals

ilStudyProgrammeAssignmentTest::$backupGlobals = false
protected

Definition at line 25 of file ilStudyProgrammeAssignmentTest.php.


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