181 $lastResetDate = $this->getMockBuilder(ilDate::class)
182 ->disableOriginalConstructor()
187 $lastResetDate->setDate($date->getTimestamp(),
IL_CAL_UNIX);
190 ->expects($this->any())
193 'seconds' => (
int) $date->format(
's'),
194 'minutes' => (int) $date->format(
'i'),
195 'hours' => (int) $date->format(
'G'),
196 'mday' => (int) $date->format(
'j'),
197 'wday' => (int) $date->format(
'w'),
198 'mon' => (int) $date->format(
'n'),
199 'year' => (int) $date->format(
'Y'),
200 'yday' => (int) $date->format(
'z'),
201 'weekday' => $date->format(
'l'),
202 'month' => $date->format(
'F'),
203 'isoday' => (int) $date->format(
'N')
207 ->expects($this->any())
212 ->expects($this->any())
213 ->method(
'getLastResetDate')
214 ->willReturn($lastResetDate);
217 ->expects($this->once())
219 ->willReturn(
'getResetMessageBoxHtml');
222 ->expects($this->once())
223 ->method(
'getLinkTarget')
224 ->with($this->isInstanceOf(ilTermsOfServiceDocumentGUI::class),
'confirmReset')
225 ->willReturn(
'confirmReset');
228 ->expects($this->any())
229 ->method(
'checkAccess')
233 $button = $this->getMockBuilder(Standard::class)->getMock();
236 ->expects($this->once())
238 ->with($this->isType(
'string'), $this->equalTo(
'confirmReset'))
239 ->willReturn($button);
242 ->expects($this->once())
244 ->willReturn($buttonFactory);
247 $info = $this->getMockBuilder(MessageBox::class)->getMock();
250 ->expects($this->once())
252 ->with($this->stringContains(
'Some date:'))
256 ->expects($this->once())
257 ->method(
'withButtons')
258 ->with($this->countOf(1));
261 ->expects($this->once())
262 ->method(
'messageBox')
263 ->willReturn($messageBoxFactory);
266 ->expects($this->never())
267 ->method(
'raiseError');
270 ->expects($this->atLeast(1))
275 ->expects($this->exactly(2))
277 ->willReturnOnConsecutiveCalls(
284 $this->criterionTypeFactory,
298 $this->tableDataProviderFactory,
299 $this->documentPurifier
302 $gui->executeCommand();
setGlobalVariable(string $name, $value)
Class ChatMainBarProvider .
Class ilTermsOfServiceDocumentGUI.