11 $object = $this->getMockBuilder(
'ilObjTest')
12 ->disableOriginalConstructor()
15 $formMock = $this->getMockBuilder(
'ilPropertyFormGUI')
16 ->disableOriginalConstructor()
19 $language = $this->getMockBuilder(
'ilLanguage')
20 ->disableOriginalConstructor()
23 $controller = $this->getMockBuilder(
'ilCtrl')
24 ->disableOriginalConstructor()
27 $access = $this->getMockBuilder(
'ilAccess')
28 ->disableOriginalConstructor()
31 $toolbar = $this->getMockBuilder(
'ilToolbarGUI')
32 ->disableOriginalConstructor()
35 $placeholderDescriptionObject = $this->getMockBuilder(
'ilCertificatePlaceholderDescription')
36 ->disableOriginalConstructor()
39 $settingsFormFactory = $this->getMockBuilder(
'ilCertificateSettingsFormRepository')
40 ->disableOriginalConstructor()
44 ->expects($this->once())
45 ->method(
'createForm')
46 ->willReturn($formMock);
57 $placeholderDescriptionObject,
61 $guiMock = $this->getMockBuilder(
'ilCertificateGUI')
62 ->disableOriginalConstructor()
65 $certificateMock = $this->getMockBuilder(
'ilCertificate')
66 ->disableOriginalConstructor()
69 $result = $repository->createForm($guiMock, $certificateMock);
71 $this->assertEquals($formMock,
$result);
79 $object = $this->getMockBuilder(
'ilObjTest')
80 ->disableOriginalConstructor()
87 $language = $this->getMockBuilder(
'ilLanguage')
88 ->disableOriginalConstructor()
91 $controller = $this->getMockBuilder(
'ilCtrl')
92 ->disableOriginalConstructor()
95 $access = $this->getMockBuilder(
'ilAccess')
96 ->disableOriginalConstructor()
99 $toolbar = $this->getMockBuilder(
'ilToolbarGUI')
100 ->disableOriginalConstructor()
103 $placeholderDescriptionObject = $this->getMockBuilder(
'ilCertificatePlaceholderDescription')
104 ->disableOriginalConstructor()
107 $settingsFormFactory = $this->getMockBuilder(
'ilCertificateSettingsFormRepository')
108 ->disableOriginalConstructor()
120 $placeholderDescriptionObject,
124 $repository->save(array(1, 2, 3));
129 $object = $this->getMockBuilder(
'ilObjTest')
130 ->disableOriginalConstructor()
137 $language = $this->getMockBuilder(
'ilLanguage')
138 ->disableOriginalConstructor()
141 $controller = $this->getMockBuilder(
'ilCtrl')
142 ->disableOriginalConstructor()
145 $access = $this->getMockBuilder(
'ilAccess')
146 ->disableOriginalConstructor()
149 $toolbar = $this->getMockBuilder(
'ilToolbarGUI')
150 ->disableOriginalConstructor()
153 $placeholderDescriptionObject = $this->getMockBuilder(
'ilCertificatePlaceholderDescription')
154 ->disableOriginalConstructor()
157 $settingsFormFactory = $this->getMockBuilder(
'ilCertificateSettingsFormRepository')
158 ->disableOriginalConstructor()
162 ->expects($this->once())
163 ->method(
'fetchFormFieldData')
164 ->willReturn(array(
'something' =>
'value'));
175 $placeholderDescriptionObject,
179 $result = $repository->fetchFormFieldData(
'SomeContent');
181 $this->assertEquals(array(
'something' =>
'value'),
$result);
Class ilCertificateBaseTestCase.