11 $defaultPlaceholderValues = $this->getMockBuilder(
'ilDefaultPlaceholderValues')
12 ->disableOriginalConstructor()
15 $defaultPlaceholderValues->method(
'getPlaceholderValues')
16 ->willReturn(array());
18 $language = $this->getMockBuilder(
'ilLanguage')
19 ->disableOriginalConstructor()
23 ->willReturn(
'Something');
25 $objectMock = $this->getMockBuilder(
'ilObject')
26 ->disableOriginalConstructor()
29 $objectMock->method(
'getTitle')
30 ->willReturn(
'Some Title');
32 $objectHelper = $this->getMockBuilder(
'ilCertificateObjectHelper')
35 $objectHelper->method(
'getInstanceByObjId')
36 ->willReturn($objectMock);
38 $participantsHelper = $this->getMockBuilder(
'ilCertificateParticipantsHelper')
41 $participantsHelper->method(
'getDateTimeOfPassed')
42 ->willReturn(
'2018-09-10');
44 $ilUtilHelper = $this->getMockBuilder(
'ilCertificateUtilHelper')
47 $ilUtilHelper->method(
'prepareFormOutput')
48 ->willReturn(
'Some Title');
50 $ilDateHelper = $this->getMockBuilder(
'ilCertificateDateHelper')
53 $ilDateHelper->method(
'formatDate')
54 ->willReturn(
'2018-09-10');
56 $ilDateHelper->method(
'formatDateTime')
57 ->willReturn(
'2018-09-10 10:32:00');
60 $defaultPlaceholderValues,
68 $placeholderValues = $valuesObject->getPlaceholderValues(100, 200);
72 'COURSE_TITLE' =>
'Some Title',
73 'DATE_COMPLETED' =>
'2018-09-10',
74 'DATETIME_COMPLETED' =>
'2018-09-10 10:32:00' 82 $defaultPlaceholderValues = $this->getMockBuilder(
'ilDefaultPlaceholderValues')
83 ->disableOriginalConstructor()
86 $defaultPlaceholderValues->method(
'getPlaceholderValuesForPreview')
89 'SOME_PLACEHOLDER' =>
'ANYTHING',
90 'SOME_OTHER_PLACEHOLDER' =>
'2018-09-10',
94 $language = $this->getMockBuilder(
'ilLanguage')
95 ->disableOriginalConstructor()
99 ->willReturn(
'Something');
101 $objectMock = $this->getMockBuilder(
'ilObject')
102 ->disableOriginalConstructor()
105 $objectMock->method(
'getTitle')
106 ->willReturn(
'SomeTitle');
108 $objectHelper = $this->getMockBuilder(
'ilCertificateObjectHelper')
111 $objectHelper->method(
'getInstanceByObjId')
112 ->willReturn($objectMock);
114 $participantsHelper = $this->getMockBuilder(
'ilCertificateParticipantsHelper')
117 $utilHelper = $this->getMockBuilder(
'ilCertificateUtilHelper')
120 $utilHelper->method(
'prepareFormOutput')
121 ->willReturnCallback(
function (
$input) {
126 $defaultPlaceholderValues,
133 $placeholderValues = $valuesObject->getPlaceholderValuesForPreview(100, 10);
137 'SOME_PLACEHOLDER' =>
'ANYTHING',
138 'SOME_OTHER_PLACEHOLDER' =>
'2018-09-10',
139 'COURSE_TITLE' =>
'SomeTitle'
testGetPreviewPlaceholderValues()
testGetPlaceholderValues()