◆ testAllCoursesAreCompletedOnLPChange()
ilCertificateCourseLearningProgressEvaluationTest::testAllCoursesAreCompletedOnLPChange |
( |
| ) |
|
Definition at line 111 of file ilCertificateCourseLearningProgressEvaluationTest.php.
References ilLPStatus\LP_STATUS_COMPLETED_NUM.
113 $templateRepository = $this->getMockBuilder(
'ilCertificateTemplateRepository')
114 ->disableOriginalConstructor()
117 $templateRepository->method(
'fetchActiveTemplatesByType')
123 '<xml>Some Content</xml>',
124 md5(
'<xml>Some Content</xml>'),
130 '/some/where/background.jpg',
131 '/some/where/thumbnail.svg',
137 '<xml>Some Content</xml>',
138 md5(
'<xml>Some Content</xml>'),
144 '/some/where/background.jpg',
145 '/some/where/thumbnail.svg',
151 $setting = $this->getMockBuilder(
'ilSetting')
152 ->disableOriginalConstructor()
158 array(
'cert_subitems_5'),
159 array(
'cert_subitems_6')
161 ->willReturnOnConsecutiveCalls(
166 $objectHelper = $this->getMockBuilder(
'ilCertificateObjectHelper')
169 $objectHelper->method(
'lookupObjId')
176 ->willReturnOnConsecutiveCalls(100, 200, 100, 500);
178 $statusHelper = $this->getMockBuilder(
'ilCertificateLPStatusHelper')
181 $statusHelper->method(
'lookUpStatus')
188 ->willReturnOnConsecutiveCalls(
195 $trackingHelper = $this->getMockBuilder(
'ilCertificateObjUserTrackingHelper')
198 $trackingHelper->method(
'enabledLearningProgress')->willReturn(
false);
208 $completedCourses = $evaluation->evaluate(10, 200);
210 $this->assertEquals(5, $completedCourses[0]->getObjId());
211 $this->assertEquals(6, $completedCourses[1]->getObjId());
const LP_STATUS_COMPLETED_NUM
◆ testNoSubitemDefinedForEvaluation()
ilCertificateCourseLearningProgressEvaluationTest::testNoSubitemDefinedForEvaluation |
( |
| ) |
|
Definition at line 214 of file ilCertificateCourseLearningProgressEvaluationTest.php.
216 $templateRepository = $this->getMockBuilder(
'ilCertificateTemplateRepository')
217 ->disableOriginalConstructor()
220 $templateRepository->method(
'fetchActiveTemplatesByType')
226 '<xml>Some Content</xml>',
227 md5(
'<xml>Some Content</xml>'),
233 '/some/where/background.jpg',
234 '/some/where/thumbnail.svg',
240 '<xml>Some Content</xml>',
241 md5(
'<xml>Some Content</xml>'),
247 '/some/where/background.jpg',
248 '/some/where/thumbnail.svg',
254 $setting = $this->getMockBuilder(
'ilSetting')
255 ->disableOriginalConstructor()
261 array(
'cert_subitems_5'),
262 array(
'cert_subitems_6')
264 ->willReturnOnConsecutiveCalls(
269 $objectHelper = $this->getMockBuilder(
'ilCertificateObjectHelper')
272 $statusHelper = $this->getMockBuilder(
'ilCertificateLPStatusHelper')
275 $trackingHelper = $this->getMockBuilder(
'ilCertificateObjUserTrackingHelper')
278 $trackingHelper->method(
'enabledLearningProgress')->willReturn(
false);
288 $completedCourses = $evaluation->evaluate(10, 200);
290 $this->assertEquals(array(), $completedCourses);
◆ testOnlyOneCourseIsCompletedOnLPChange()
ilCertificateCourseLearningProgressEvaluationTest::testOnlyOneCourseIsCompletedOnLPChange |
( |
| ) |
|
Definition at line 9 of file ilCertificateCourseLearningProgressEvaluationTest.php.
References ilLPStatus\LP_STATUS_COMPLETED_NUM, and ilLPStatus\LP_STATUS_IN_PROGRESS.
11 $templateRepository = $this->getMockBuilder(
'ilCertificateTemplateRepository')
12 ->disableOriginalConstructor()
15 $templateRepository->method(
'fetchActiveTemplatesByType')
21 '<xml>Some Content</xml>',
22 md5(
'<xml>Some Content</xml>'),
28 '/some/where/background.jpg',
29 '/some/where/thumbnail.svg',
35 '<xml>Some Content</xml>',
36 md5(
'<xml>Some Content</xml>'),
42 '/some/where/background.jpg',
43 '/some/where/thumbnail.svg',
49 $setting = $this->getMockBuilder(
'ilSetting')
50 ->disableOriginalConstructor()
56 array(
'cert_subitems_5'),
57 array(
'cert_subitems_6')
59 ->willReturnOnConsecutiveCalls(
64 $objectHelper = $this->getMockBuilder(
'ilCertificateObjectHelper')
67 $objectHelper->method(
'lookupObjId')
74 ->willReturnOnConsecutiveCalls(100, 200, 100, 500);
76 $statusHelper = $this->getMockBuilder(
'ilCertificateLPStatusHelper')
79 $statusHelper->method(
'lookUpStatus')
86 ->willReturnOnConsecutiveCalls(
93 $trackingHelper = $this->getMockBuilder(
'ilCertificateObjUserTrackingHelper')
96 $trackingHelper->method(
'enabledLearningProgress')->willReturn(
false);
106 $completedCourses = $evaluation->evaluate(10, 200);
108 $this->assertEquals(5, $completedCourses[0]->getObjId());
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_IN_PROGRESS
The documentation for this class was generated from the following file: