19 declare(strict_types=1);
28 $object = $this->getMockBuilder(ilObjCourse::class)
29 ->disableOriginalConstructor()
33 ->expects($this->atLeastOnce())
37 $language = $this->getMockBuilder(ilLanguage::class)
38 ->disableOriginalConstructor()
41 $controller = $this->getMockBuilder(ilCtrlInterface::class)
42 ->disableOriginalConstructor()
45 $access = $this->getMockBuilder(ilAccess::class)
46 ->disableOriginalConstructor()
49 $toolbar = $this->getMockBuilder(ilToolbarGUI::class)
50 ->disableOriginalConstructor()
53 $placeholderDescriptionObject = $this->getMockBuilder(ilCertificatePlaceholderDescription::class)
54 ->disableOriginalConstructor()
57 $leaningProgressObject = $this->getMockBuilder(ilObjectLP::class)
58 ->disableOriginalConstructor()
61 $settingsFormFactory = $this->getMockBuilder(ilCertificateSettingsFormRepository::class)
62 ->disableOriginalConstructor()
65 $trackingHelper = $this->getMockBuilder(ilCertificateObjUserTrackingHelper::class)
66 ->disableOriginalConstructor()
69 $objectHelper = $this->getMockBuilder(ilCertificateObjectHelper::class)
70 ->disableOriginalConstructor()
73 $lpHelper = $this->getMockBuilder(ilCertificateObjectLPHelper::class)
74 ->disableOriginalConstructor()
77 $lpMock = $this->getMockBuilder(ilObjectLP::class)
78 ->disableOriginalConstructor()
81 $lpMock->method(
'getCurrentMode')
84 $lpHelper->method(
'getInstance')->willReturn($lpMock);
86 $tree = $this->getMockBuilder(ilTree::class)
87 ->disableOriginalConstructor()
90 $setting = $this->getMockBuilder(ilSetting::class)
91 ->disableOriginalConstructor()
95 ->expects($this->atLeastOnce())
106 $placeholderDescriptionObject,
107 $leaningProgressObject,
108 $settingsFormFactory,
116 $repository->save([
'subitems' => [1, 2, 3]]);
121 $object = $this->getMockBuilder(ilObjCourse::class)
122 ->disableOriginalConstructor()
126 ->expects($this->atLeastOnce())
130 $language = $this->getMockBuilder(ilLanguage::class)
131 ->disableOriginalConstructor()
134 $controller = $this->getMockBuilder(ilCtrlInterface::class)
135 ->disableOriginalConstructor()
138 $access = $this->getMockBuilder(ilAccess::class)
139 ->disableOriginalConstructor()
142 $toolbar = $this->getMockBuilder(ilToolbarGUI::class)
143 ->disableOriginalConstructor()
146 $placeholderDescriptionObject = $this->getMockBuilder(ilCertificatePlaceholderDescription::class)
147 ->disableOriginalConstructor()
150 $leaningProgressObject = $this->getMockBuilder(ilObjectLP::class)
151 ->disableOriginalConstructor()
154 $settingsFormFactory = $this->getMockBuilder(ilCertificateSettingsFormRepository::class)
155 ->disableOriginalConstructor()
159 ->expects($this->atLeastOnce())
160 ->method(
'fetchFormFieldData')
164 'something_else' =>
'something' 168 $trackingHelper = $this->getMockBuilder(ilCertificateObjUserTrackingHelper::class)
169 ->disableOriginalConstructor()
172 $objectHelper = $this->getMockBuilder(ilCertificateObjectHelper::class)
173 ->disableOriginalConstructor()
176 $lpHelper = $this->getMockBuilder(ilCertificateObjectLPHelper::class)
177 ->disableOriginalConstructor()
180 $tree = $this->getMockBuilder(ilTree::class)
181 ->disableOriginalConstructor()
184 $setting = $this->getMockBuilder(ilSetting::class)
185 ->disableOriginalConstructor()
189 ->expects($this->atLeastOnce())
191 ->willReturn(
'[1, 2, 3]');
201 $placeholderDescriptionObject,
202 $leaningProgressObject,
203 $settingsFormFactory,
211 $result = $repository->fetchFormFieldData(
'Some Content');
215 'subitems' => [1, 2, 3],
216 'something_else' =>
'something' Class ilCertificateBaseTestCase.