11 $formMock = $this->getMockBuilder(
'ilPropertyFormGUI')
12 ->disableOriginalConstructor()
15 $object = $this->getMockBuilder(
'ilObject')
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);
60 $placeholderDescriptionObject,
64 $guiMock = $this->getMockBuilder(
'ilCertificateGUI')
65 ->disableOriginalConstructor()
68 $certificateMock = $this->getMockBuilder(
'ilCertificate')
69 ->disableOriginalConstructor()
72 $result = $repository->createForm($guiMock, $certificateMock);
74 $this->assertEquals($formMock,
$result);
79 $object = $this->getMockBuilder(
'ilObject')
80 ->disableOriginalConstructor()
87 $language = $this->getMockBuilder(
'ilLanguage')
88 ->disableOriginalConstructor()
91 $template = $this->getMockBuilder(
'ilTemplate')
92 ->disableOriginalConstructor()
95 $controller = $this->getMockBuilder(
'ilCtrl')
96 ->disableOriginalConstructor()
99 $access = $this->getMockBuilder(
'ilAccess')
100 ->disableOriginalConstructor()
103 $toolbar = $this->getMockBuilder(
'ilToolbarGUI')
104 ->disableOriginalConstructor()
107 $placeholderDescriptionObject = $this->getMockBuilder(
'ilCertificatePlaceholderDescription')
108 ->disableOriginalConstructor()
111 $settingsFormFactory = $this->getMockBuilder(
'ilCertificateSettingsFormRepository')
112 ->disableOriginalConstructor()
123 $placeholderDescriptionObject,
127 $repository->save(array(1, 2, 3));
132 $object = $this->getMockBuilder(
'ilObject')
133 ->disableOriginalConstructor()
140 $language = $this->getMockBuilder(
'ilLanguage')
141 ->disableOriginalConstructor()
144 $template = $this->getMockBuilder(
'ilTemplate')
145 ->disableOriginalConstructor()
148 $controller = $this->getMockBuilder(
'ilCtrl')
149 ->disableOriginalConstructor()
152 $access = $this->getMockBuilder(
'ilAccess')
153 ->disableOriginalConstructor()
156 $toolbar = $this->getMockBuilder(
'ilToolbarGUI')
157 ->disableOriginalConstructor()
160 $placeholderDescriptionObject = $this->getMockBuilder(
'ilCertificatePlaceholderDescription')
161 ->disableOriginalConstructor()
164 $settingsFormFactory = $this->getMockBuilder(
'ilCertificateSettingsFormRepository')
165 ->disableOriginalConstructor()
169 ->expects($this->
once())
170 ->method(
'fetchFormFieldData')
171 ->willReturn(array(
'something' =>
'value'));
181 $placeholderDescriptionObject,
185 $result = $repository->fetchFormFieldData(
'SomeContent');
187 $this->assertEquals(array(
'something' =>
'value'),
$result);
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.