diff options
Diffstat (limited to 'apps/files_sharing/tests/Controller/ShareControllerTest.php')
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareControllerTest.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php index 58cbb4e0b82..524336787cb 100644 --- a/apps/files_sharing/tests/Controller/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php @@ -261,8 +261,12 @@ class ShareControllerTest extends \Test\TestCase { ['files_sharing.sharecontroller.showShare', ['token' => 'token'], 'shareUrl'], // this share is not an image to the default preview is used ['files_sharing.PublicPreview.getPreview', ['x' => 256, 'y' => 256, 'file' => $share->getTarget(), 'token' => 'token'], 'previewUrl'], - // for the direct link - ['files_sharing.sharecontroller.downloadShare', ['token' => 'token', 'filename' => $filename ], 'downloadUrl'], + ]); + + $this->urlGenerator->expects($this->once()) + ->method('getAbsoluteURL') + ->willReturnMap([ + ['/public.php/dav/files/token/?accept=zip', 'downloadUrl'], ]); $this->previewManager->method('isMimeSupported')->with('text/plain')->willReturn(true); @@ -552,8 +556,12 @@ class ShareControllerTest extends \Test\TestCase { ['files_sharing.sharecontroller.showShare', ['token' => 'token'], 'shareUrl'], // this share is not an image to the default preview is used ['files_sharing.PublicPreview.getPreview', ['x' => 256, 'y' => 256, 'file' => $share->getTarget(), 'token' => 'token'], 'previewUrl'], - // for the direct link - ['files_sharing.sharecontroller.downloadShare', ['token' => 'token', 'filename' => $filename ], 'downloadUrl'], + ]); + + $this->urlGenerator->expects($this->once()) + ->method('getAbsoluteURL') + ->willReturnMap([ + ['/public.php/dav/files/token/?accept=zip', 'downloadUrl'], ]); $this->previewManager->method('isMimeSupported')->with('text/plain')->willReturn(true); |