ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjStudyProgrammeCertificateTest Class Reference
+ Inheritance diagram for ilObjStudyProgrammeCertificateTest:
+ Collaboration diagram for ilObjStudyProgrammeCertificateTest:

Public Member Functions

 setUp ()
 
 testPRGCertificateLatestProgressNoAssignments ()
 
 testPRGCertificateLatestProgressUnsuccesfulAssignments ()
 
 testPRGCertificateLatestProgressWithOnlySuccessfulAssignments ()
 
 testPRGCertificateLatestProgressWithMixedAssignments ()
 
 testPRGCertificateLatestProgressWithOnlyLimitedAssignments ()
 

Protected Attributes

 $backupGlobals = false
 
PRGPlaceholderMock $placeholder_mock
 
array $assignments
 

Detailed Description

Definition at line 35 of file ilObjStudyProgrammeCertificateTest.php.

Member Function Documentation

◆ setUp()

ilObjStudyProgrammeCertificateTest::setUp ( )

Definition at line 41 of file ilObjStudyProgrammeCertificateTest.php.

References ilPRGProgress\STATUS_COMPLETED, and ilPRGProgress\STATUS_IN_PROGRESS.

41  : void
42  {
44  ->withCompletion(7, new DateTimeImmutable('2023-12-01'))
45  ->withValidityOfQualification(new DateTimeImmutable('2023-12-31'));
46  $ass0 = (new ilPRGAssignment(1, 6))
47  ->withProgressTree($pgs);
48 
50  $ass1 = (new ilPRGAssignment(1, 6))
51  ->withProgressTree($pgs);
52 
54  ->withCompletion(7, new DateTimeImmutable('2023-12-02'))
55  ->withValidityOfQualification(new DateTimeImmutable('2023-12-30'));
56  $ass2 = (new ilPRGAssignment(1, 6))
57  ->withProgressTree($pgs);
58 
60  ->withCompletion(7, new DateTimeImmutable('2023-11-01'));
61  $ass3 = (new ilPRGAssignment(1, 6))
62  ->withProgressTree($pgs);
63 
64  $this->assignments = [
65  $ass0, $ass1, $ass2, $ass3
66  ];
67  $this->placeholder_mock = new PRGPlaceholderMock();
68  }
A Progress is the status of a user on a single node of an assignment; it is unique by assignment_id:u...
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...

◆ testPRGCertificateLatestProgressNoAssignments()

ilObjStudyProgrammeCertificateTest::testPRGCertificateLatestProgressNoAssignments ( )

Definition at line 70 of file ilObjStudyProgrammeCertificateTest.php.

70  : void
71  {
72  $assignments = [];
73  $pgs = $this->placeholder_mock->getRelevantProgress($assignments);
74  $this->assertNull($pgs);
75  }

◆ testPRGCertificateLatestProgressUnsuccesfulAssignments()

ilObjStudyProgrammeCertificateTest::testPRGCertificateLatestProgressUnsuccesfulAssignments ( )

Definition at line 77 of file ilObjStudyProgrammeCertificateTest.php.

77  : void
78  {
79  $assignments = [$this->assignments[1]];
80  $pgs = $this->placeholder_mock->getRelevantProgress($assignments);
81  $this->assertEquals($this->assignments[1]->getProgressTree(), $pgs);
82  }

◆ testPRGCertificateLatestProgressWithMixedAssignments()

ilObjStudyProgrammeCertificateTest::testPRGCertificateLatestProgressWithMixedAssignments ( )

Definition at line 95 of file ilObjStudyProgrammeCertificateTest.php.

95  : void
96  {
98  $pgs = $this->placeholder_mock->getRelevantProgress($assignments);
99  $this->assertEquals($this->assignments[3]->getProgressTree(), $pgs);
100  }

◆ testPRGCertificateLatestProgressWithOnlyLimitedAssignments()

ilObjStudyProgrammeCertificateTest::testPRGCertificateLatestProgressWithOnlyLimitedAssignments ( )

Definition at line 102 of file ilObjStudyProgrammeCertificateTest.php.

102  : void
103  {
104  $assignments = [
105  $this->assignments[0],
106  $this->assignments[2]
107  ];
108  $pgs = $this->placeholder_mock->getRelevantProgress($assignments);
109  $this->assertEquals($this->assignments[0]->getProgressTree(), $pgs);
110  }

◆ testPRGCertificateLatestProgressWithOnlySuccessfulAssignments()

ilObjStudyProgrammeCertificateTest::testPRGCertificateLatestProgressWithOnlySuccessfulAssignments ( )

Definition at line 84 of file ilObjStudyProgrammeCertificateTest.php.

84  : void
85  {
86  $assignments = [
87  $this->assignments[0],
88  $this->assignments[2],
89  $this->assignments[3]
90  ];
91  $pgs = $this->placeholder_mock->getRelevantProgress($assignments);
92  $this->assertEquals($this->assignments[3]->getProgressTree(), $pgs);
93  }

Field Documentation

◆ $assignments

array ilObjStudyProgrammeCertificateTest::$assignments
protected

Definition at line 39 of file ilObjStudyProgrammeCertificateTest.php.

◆ $backupGlobals

ilObjStudyProgrammeCertificateTest::$backupGlobals = false
protected

Definition at line 37 of file ilObjStudyProgrammeCertificateTest.php.

◆ $placeholder_mock

PRGPlaceholderMock ilObjStudyProgrammeCertificateTest::$placeholder_mock
protected

Definition at line 38 of file ilObjStudyProgrammeCertificateTest.php.


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