summaryrefslogtreecommitdiffstats
path: root/apps/theming/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-01-18 17:00:09 +0100
committerLukas Reschke <lukas@statuscode.ch>2017-01-18 17:00:09 +0100
commitbe3ec7ffb78aa42731e4e1170b5c190549d87e75 (patch)
tree1fb51c373fc437d9a004402ed60769a8cb0a7902 /apps/theming/tests
parent29d2ca59912f1de1d9b76eb05941e52bd8c8a88a (diff)
downloadnextcloud-server-be3ec7ffb78aa42731e4e1170b5c190549d87e75.tar.gz
nextcloud-server-be3ec7ffb78aa42731e4e1170b5c190549d87e75.zip
Use DataDownloadResponse
1. As documented 2. No need to show this inline, downloading has security advantages Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/theming/tests')
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php
index d42e5afb245..f7c4a9f120e 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -910,7 +910,6 @@ class ThemingControllerTest extends TestCase {
'background-image: url(\'./img/core/filetypes/folder.svg?v=0\');' . "}\n" .
'.icon-filetype-folder-drag-accept {' .
'background-image: url(\'./img/core/filetypes/folder-drag-accept.svg?v=0\')!important;' . "}\n";
- $expected = new Http\DataDownloadResponse($expectedData, 'style', 'text/css');
$expected = new Http\DataDownloadResponse($expectedData, 'style', 'text/css');
$expected->cacheFor(3600);
@@ -948,8 +947,7 @@ class ThemingControllerTest extends TestCase {
cacheBuster: null
};
})();';
- $expected = new Http\DataDisplayResponse($expectedResponse);
- $expected->addHeader("Content-type","text/javascript");
+ $expected = new Http\DataDownloadResponse($expectedResponse, 'javascript', 'text/javascript');
$expected->addHeader('Expires', date(\DateTime::RFC2822, $this->timeFactory->getTime()));
$expected->addHeader('Pragma', 'cache');
$expected->cacheFor(3600);
@@ -983,8 +981,7 @@ class ThemingControllerTest extends TestCase {
cacheBuster: null
};
})();';
- $expected = new Http\DataDisplayResponse($expectedResponse);
- $expected->addHeader("Content-type","text/javascript");
+ $expected = new Http\DataDownloadResponse($expectedResponse, 'javascript', 'text/javascript');
$expected->addHeader('Expires', date(\DateTime::RFC2822, $this->timeFactory->getTime()));
$expected->addHeader('Pragma', 'cache');
$expected->cacheFor(3600);