diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-05-02 12:35:42 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-05-02 12:39:37 +0200 |
commit | d25e13ea27d950aa2815bfcb7bb9bd7d81249505 (patch) | |
tree | 6a67afefef77ecb55e0b4b3398b2d15faad6ce1b /apps/dav | |
parent | 59e27f03b641e6048416b4ff252a66adc88100f7 (diff) | |
download | nextcloud-server-d25e13ea27d950aa2815bfcb7bb9bd7d81249505.tar.gz nextcloud-server-d25e13ea27d950aa2815bfcb7bb9bd7d81249505.zip |
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php index fc4be1433fe..ed311e79f4a 100644 --- a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php +++ b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php @@ -102,6 +102,8 @@ class ImageExportPluginTest extends TestCase { $this->request->expects($this->once())->method('getPath')->willReturn('/files/welcome.txt'); $card = $this->getMockBuilder('Sabre\CardDAV\Card')->disableOriginalConstructor()->getMock(); + $card->method('getETag') + ->willReturn('"myEtag"'); $this->tree->expects($this->once())->method('getNodeForPath')->with('/files/welcome.txt')->willReturn($card); $this->plugin->expects($this->once())->method('getPhoto')->willReturn($getPhotoResult); @@ -110,10 +112,22 @@ class ImageExportPluginTest extends TestCase { $this->response ->expects($this->at(0)) ->method('setHeader') - ->with('Content-Type', $getPhotoResult['Content-Type']); + ->with('Cache-Control', 'private, max-age=3600, must-revalidate'); $this->response ->expects($this->at(1)) ->method('setHeader') + ->with('Etag', '"myEtag"'); + $this->response + ->expects($this->at(2)) + ->method('setHeader') + ->with('Pragma', 'public'); + $this->response + ->expects($this->at(3)) + ->method('setHeader') + ->with('Content-Type', $getPhotoResult['Content-Type']); + $this->response + ->expects($this->at(4)) + ->method('setHeader') ->with('Content-Disposition', 'attachment'); $this->response ->expects($this->once()) |