fix(ShareAPIControllerTest): Fix return types of DateTimeZone

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
pull/56496/head
Carl Schwan 6 months ago committed by Carl Schwan
parent fa75c1b659
commit acda4ff072
No known key found for this signature in database
GPG Key ID: 02325448204E452A
  1. 7
      apps/files_sharing/tests/Controller/ShareAPIControllerTest.php

@ -125,6 +125,8 @@ class ShareAPIControllerTest extends TestCase {
return $fileInfo->getMimeType() === 'mimeWithPreview';
});
$this->dateTimeZone = $this->createMock(IDateTimeZone::class);
$this->dateTimeZone->method('getTimeZone')
->willReturn(new \DateTimeZone('UTC'));
$this->logger = $this->createMock(LoggerInterface::class);
$this->factory = $this->createMock(IProviderFactory::class);
$this->mailer = $this->createMock(IMailer::class);
@ -158,10 +160,7 @@ class ShareAPIControllerTest extends TestCase {
}
/**
* @return ShareAPIController&MockObject
*/
private function mockFormatShare() {
private function mockFormatShare(): ShareAPIController&MockObject {
return $this->getMockBuilder(ShareAPIController::class)
->setConstructorArgs([
$this->appName,

Loading…
Cancel
Save