summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-04-26 01:22:49 -0300
committerGitHub <noreply@github.com>2017-04-26 01:22:49 -0300
commitd4329f33556eaac6e863c2733e2e05964f3d0935 (patch)
tree2de5db28089ea4d51ef2034df2ad333084d49fd1 /tests
parent215573fe3ceecd701079961b598fbae9871da07b (diff)
parent8ba67fbe1ec54dd961b8df9c0dda12efb5ca8ebb (diff)
downloadnextcloud-server-d4329f33556eaac6e863c2733e2e05964f3d0935.tar.gz
nextcloud-server-d4329f33556eaac6e863c2733e2e05964f3d0935.zip
Merge pull request #4449 from stweil/mimetypes
Add mimetypes for jp2 and webp
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Repair/RepairMimeTypesTest.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/lib/Repair/RepairMimeTypesTest.php b/tests/lib/Repair/RepairMimeTypesTest.php
index ef1412b2fd2..f30bbdf7d11 100644
--- a/tests/lib/Repair/RepairMimeTypesTest.php
+++ b/tests/lib/Repair/RepairMimeTypesTest.php
@@ -107,6 +107,23 @@ class RepairMimeTypesTest extends \Test\TestCase {
}
/**
+ * Test renaming the additional image mime types
+ */
+ public function testRenameImageTypes() {
+ $currentMimeTypes = [
+ ['test.jp2', 'application/octet-stream'],
+ ['test.webp', 'application/octet-stream'],
+ ];
+
+ $fixedMimeTypes = [
+ ['test.jp2', 'image/jp2'],
+ ['test.webp', 'image/webp'],
+ ];
+
+ $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
+ }
+
+ /**
* Test renaming the richdocuments additional office mime types
*/
public function testRenameWindowsProgramTypes() {
@@ -163,8 +180,10 @@ class RepairMimeTypesTest extends \Test\TestCase {
['test.sr2', 'image/x-dcraw'],
['test.xrf', 'image/x-dcraw'],
['test.DNG', 'image/x-dcraw'],
+ ['test.jp2', 'image/jp2'],
['test.jps', 'image/jpeg'],
['test.MPO', 'image/jpeg'],
+ ['test.webp', 'image/webp'],
['test.conf', 'text/plain'],
['test.cnf', 'text/plain'],
['test.yaml', 'application/yaml'],
@@ -215,8 +234,10 @@ class RepairMimeTypesTest extends \Test\TestCase {
['test.sr2', 'image/x-dcraw'],
['test.xrf', 'image/x-dcraw'],
['test.DNG', 'image/x-dcraw'],
+ ['test.jp2', 'image/jp2'],
['test.jps', 'image/jpeg'],
['test.MPO', 'image/jpeg'],
+ ['test.webp', 'image/webp'],
['test.conf', 'text/plain'],
['test.cnf', 'text/plain'],
['test.yaml', 'application/yaml'],