19 declare(strict_types=1);
32 $form_mock = $this->getMockBuilder(\ilPropertyFormGUI::class)
33 ->disableOriginalConstructor()
36 $language = $this->getMockBuilder(\ilLanguage::class)
37 ->disableOriginalConstructor()
40 $controller = $this->getMockBuilder(\ilCtrlInterface::class)
41 ->disableOriginalConstructor()
44 $access = $this->getMockBuilder(\ilAccess::class)
45 ->disableOriginalConstructor()
48 $toolbar = $this->getMockBuilder(\ilToolbarGUI::class)
49 ->disableOriginalConstructor()
52 $placeholder_description_object = $this->getMockBuilder(\ilCertificatePlaceholderDescription::class)
53 ->disableOriginalConstructor()
56 $settings_form_factory = $this->getMockBuilder(\ilCertificateSettingsFormRepository::class)
57 ->disableOriginalConstructor()
60 $settings_form_factory
61 ->expects($this->once())
62 ->method(
'createForm')
63 ->willReturn($form_mock);
73 $placeholder_description_object,
74 $settings_form_factory
77 $gui_mock = $this->getMockBuilder(\ilCertificateGUI::class)
78 ->disableOriginalConstructor()
81 $result = $repository->createForm($gui_mock);
83 $this->assertSame($form_mock, $result);
91 $language = $this->getMockBuilder(\ilLanguage::class)
92 ->disableOriginalConstructor()
95 $controller = $this->getMockBuilder(\ilCtrlInterface::class)
96 ->disableOriginalConstructor()
99 $access = $this->getMockBuilder(\ilAccess::class)
100 ->disableOriginalConstructor()
103 $toolbar = $this->getMockBuilder(\ilToolbarGUI::class)
104 ->disableOriginalConstructor()
107 $placeholderDescriptionObject = $this->getMockBuilder(\ilCertificatePlaceholderDescription::class)
108 ->disableOriginalConstructor()
111 $settingsFormFactory = $this->getMockBuilder(\ilCertificateSettingsFormRepository::class)
112 ->disableOriginalConstructor()
123 $placeholderDescriptionObject,
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 $settingsFormFactory = $this->getMockBuilder(\ilCertificateSettingsFormRepository::class)
151 ->disableOriginalConstructor()
155 ->expects($this->once())
156 ->method(
'fetchFormFieldData')
157 ->willReturn([
'something' =>
'value']);
167 $placeholderDescriptionObject,
171 $result = $repository->fetchFormFieldData(
'SomeContent');
173 $this->assertSame([
'something' =>
'value'], $result);