19 declare(strict_types=1);
28 $object = $this->getMockBuilder(ilObjTest::class)
29 ->disableOriginalConstructor()
32 $formMock = $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 $placeholderDescriptionObject = $this->getMockBuilder(ilCertificatePlaceholderDescription::class)
53 ->disableOriginalConstructor()
56 $settingsFormFactory = $this->getMockBuilder(ilCertificateSettingsFormRepository::class)
57 ->disableOriginalConstructor()
61 ->expects($this->once())
62 ->method(
'createForm')
63 ->willReturn($formMock);
74 $placeholderDescriptionObject,
78 $guiMock = $this->getMockBuilder(ilCertificateGUI::class)
79 ->disableOriginalConstructor()
82 $result = $repository->createForm($guiMock);
84 $this->assertSame($formMock, $result);
92 $object = $this->getMockBuilder(ilObjTest::class)
93 ->disableOriginalConstructor()
100 $language = $this->getMockBuilder(ilLanguage::class)
101 ->disableOriginalConstructor()
104 $controller = $this->getMockBuilder(ilCtrlInterface::class)
105 ->disableOriginalConstructor()
108 $access = $this->getMockBuilder(ilAccess::class)
109 ->disableOriginalConstructor()
112 $toolbar = $this->getMockBuilder(ilToolbarGUI::class)
113 ->disableOriginalConstructor()
116 $placeholderDescriptionObject = $this->getMockBuilder(ilCertificatePlaceholderDescription::class)
117 ->disableOriginalConstructor()
120 $settingsFormFactory = $this->getMockBuilder(ilCertificateSettingsFormRepository::class)
121 ->disableOriginalConstructor()
133 $placeholderDescriptionObject,
137 $repository->save([1, 2, 3]);
142 $object = $this->getMockBuilder(ilObjTest::class)
143 ->disableOriginalConstructor()
150 $language = $this->getMockBuilder(ilLanguage::class)
151 ->disableOriginalConstructor()
154 $controller = $this->getMockBuilder(ilCtrlInterface::class)
155 ->disableOriginalConstructor()
158 $access = $this->getMockBuilder(ilAccess::class)
159 ->disableOriginalConstructor()
162 $toolbar = $this->getMockBuilder(ilToolbarGUI::class)
163 ->disableOriginalConstructor()
166 $placeholderDescriptionObject = $this->getMockBuilder(ilCertificatePlaceholderDescription::class)
167 ->disableOriginalConstructor()
170 $settingsFormFactory = $this->getMockBuilder(ilCertificateSettingsFormRepository::class)
171 ->disableOriginalConstructor()
175 ->expects($this->once())
176 ->method(
'fetchFormFieldData')
177 ->willReturn([
'something' =>
'value']);
188 $placeholderDescriptionObject,
192 $result = $repository->fetchFormFieldData(
'SomeContent');
194 $this->assertSame([
'something' =>
'value'], $result);
Class ilCertificateBaseTestCase.