Skip to content

Commit 95fbaeb

Browse files
committed
fix(ShareAPIControllerTest): Fix return types of DateTimeZone
Signed-off-by: Carl Schwan <[email protected]>
1 parent 5c8b1e9 commit 95fbaeb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

apps/files_sharing/tests/Controller/ShareAPIControllerTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ protected function setUp(): void {
125125
return $fileInfo->getMimeType() === 'mimeWithPreview';
126126
});
127127
$this->dateTimeZone = $this->createMock(IDateTimeZone::class);
128+
$this->dateTimeZone->method('getTimeZone')
129+
->willReturn(new \DateTimeZone('UTC'));
128130
$this->logger = $this->createMock(LoggerInterface::class);
129131
$this->factory = $this->createMock(IProviderFactory::class);
130132
$this->mailer = $this->createMock(IMailer::class);
@@ -158,10 +160,7 @@ protected function setUp(): void {
158160

159161
}
160162

161-
/**
162-
* @return ShareAPIController&MockObject
163-
*/
164-
private function mockFormatShare() {
163+
private function mockFormatShare(): ShareAPIController&MockObject {
165164
return $this->getMockBuilder(ShareAPIController::class)
166165
->setConstructorArgs([
167166
$this->appName,

0 commit comments

Comments
 (0)