19 declare(strict_types=1);
27 $object = $this->getMockBuilder(ilObject::class)
28 ->disableOriginalConstructor()
31 $language = $this->getMockBuilder(ilLanguage::class)
32 ->disableOriginalConstructor()
35 $controller = $this->getMockBuilder(ilCtrlInterface::class)
36 ->disableOriginalConstructor()
39 $access = $this->getMockBuilder(ilAccess::class)
40 ->disableOriginalConstructor()
43 $toolbar = $this->getMockBuilder(ilToolbarGUI::class)
44 ->disableOriginalConstructor()
47 $placeholderDescriptionObject = $this->getMockBuilder(ilCertificatePlaceholderDescription::class)
48 ->disableOriginalConstructor()
51 $settingFormRepository = $this->getMockBuilder(ilCertificateSettingsFormRepository::class)
52 ->disableOriginalConstructor()
55 $setting = $this->getMockBuilder(ilSetting::class)
56 ->disableOriginalConstructor()
60 ->expects($this->exactly(2))
71 $placeholderDescriptionObject,
72 $settingFormRepository,
78 'certificate_enabled_scorm' =>
true,
79 'short_name' =>
'something' 86 $object = $this->getMockBuilder(ilObject::class)
87 ->disableOriginalConstructor()
90 $language = $this->getMockBuilder(ilLanguage::class)
91 ->disableOriginalConstructor()
94 $controller = $this->getMockBuilder(ilCtrlInterface::class)
95 ->disableOriginalConstructor()
98 $access = $this->getMockBuilder(ilAccess::class)
99 ->disableOriginalConstructor()
102 $toolbar = $this->getMockBuilder(ilToolbarGUI::class)
103 ->disableOriginalConstructor()
106 $placeholderDescriptionObject = $this->getMockBuilder(ilCertificatePlaceholderDescription::class)
107 ->disableOriginalConstructor()
110 $settingFormRepository = $this->getMockBuilder(ilCertificateSettingsFormRepository::class)
111 ->disableOriginalConstructor()
114 $settingFormRepository
115 ->expects($this->once())
116 ->method(
'fetchFormFieldData')
119 'certificate_enabled_scorm' =>
'',
124 $setting = $this->getMockBuilder(ilSetting::class)
125 ->disableOriginalConstructor()
129 ->expects($this->exactly(2))
131 ->willReturnOnConsecutiveCalls(
'something',
'somethingelse');
141 $placeholderDescriptionObject,
142 $settingFormRepository,
146 $result = $repository->fetchFormFieldData(
'Some Content');
150 'certificate_enabled_scorm' =>
'something',
151 'short_name' =>
'somethingelse'