11 $object = $this->getMockBuilder(
'ilObjTest')
12 ->disableOriginalConstructor()
15 $formMock = $this->getMockBuilder(
'ilPropertyFormGUI')
16 ->disableOriginalConstructor()
19 $language = $this->getMockBuilder(
'ilLanguage')
20 ->disableOriginalConstructor()
23 $template = $this->getMockBuilder(
'ilTemplate')
24 ->disableOriginalConstructor()
27 $controller = $this->getMockBuilder(
'ilCtrl')
28 ->disableOriginalConstructor()
31 $access = $this->getMockBuilder(
'ilAccess')
32 ->disableOriginalConstructor()
35 $toolbar = $this->getMockBuilder(
'ilToolbarGUI')
36 ->disableOriginalConstructor()
39 $placeholderDescriptionObject = $this->getMockBuilder(
'ilCertificatePlaceholderDescription')
40 ->disableOriginalConstructor()
43 $settingsFormFactory = $this->getMockBuilder(
'ilCertificateSettingsFormRepository')
44 ->disableOriginalConstructor()
48 ->expects($this->
once())
49 ->method(
'createForm')
50 ->willReturn($formMock);
61 $placeholderDescriptionObject,
65 $guiMock = $this->getMockBuilder(
'ilCertificateGUI')
66 ->disableOriginalConstructor()
69 $certificateMock = $this->getMockBuilder(
'ilCertificate')
70 ->disableOriginalConstructor()
73 $result = $repository->createForm($guiMock, $certificateMock);
75 $this->assertEquals($formMock,
$result);
80 $object = $this->getMockBuilder(
'ilObjTest')
81 ->disableOriginalConstructor()
88 $language = $this->getMockBuilder(
'ilLanguage')
89 ->disableOriginalConstructor()
92 $template = $this->getMockBuilder(
'ilTemplate')
93 ->disableOriginalConstructor()
96 $controller = $this->getMockBuilder(
'ilCtrl')
97 ->disableOriginalConstructor()
100 $access = $this->getMockBuilder(
'ilAccess')
101 ->disableOriginalConstructor()
104 $toolbar = $this->getMockBuilder(
'ilToolbarGUI')
105 ->disableOriginalConstructor()
108 $placeholderDescriptionObject = $this->getMockBuilder(
'ilCertificatePlaceholderDescription')
109 ->disableOriginalConstructor()
112 $settingsFormFactory = $this->getMockBuilder(
'ilCertificateSettingsFormRepository')
113 ->disableOriginalConstructor()
125 $placeholderDescriptionObject,
129 $repository->save(array(1, 2, 3));
134 $object = $this->getMockBuilder(
'ilObjTest')
135 ->disableOriginalConstructor()
142 $language = $this->getMockBuilder(
'ilLanguage')
143 ->disableOriginalConstructor()
146 $template = $this->getMockBuilder(
'ilTemplate')
147 ->disableOriginalConstructor()
150 $controller = $this->getMockBuilder(
'ilCtrl')
151 ->disableOriginalConstructor()
154 $access = $this->getMockBuilder(
'ilAccess')
155 ->disableOriginalConstructor()
158 $toolbar = $this->getMockBuilder(
'ilToolbarGUI')
159 ->disableOriginalConstructor()
162 $placeholderDescriptionObject = $this->getMockBuilder(
'ilCertificatePlaceholderDescription')
163 ->disableOriginalConstructor()
166 $settingsFormFactory = $this->getMockBuilder(
'ilCertificateSettingsFormRepository')
167 ->disableOriginalConstructor()
171 ->expects($this->
once())
172 ->method(
'fetchFormFieldData')
173 ->willReturn(array(
'something' =>
'value'));
184 $placeholderDescriptionObject,
188 $result = $repository->fetchFormFieldData(
'SomeContent');
190 $this->assertEquals(array(
'something' =>
'value'),
$result);
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.