fix(ShareAPIControllerTest): Fix return types of DateTimeZone

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
This commit is contained in:
Carl Schwan 2025-11-19 11:32:10 +01:00 committed by Carl Schwan
parent fa75c1b659
commit acda4ff072
No known key found for this signature in database
GPG key ID: 02325448204E452A

View file

@ -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,