summaryrefslogtreecommitdiffstats
path: root/tests/lib/Repair
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2017-04-25 19:06:31 +0200
committerStefan Weil <sw@weilnetz.de>2017-04-25 19:22:46 +0200
commit8ba67fbe1ec54dd961b8df9c0dda12efb5ca8ebb (patch)
treea462d991194ced0001fa1418c011df0ab9f7c213 /tests/lib/Repair
parentc9e08a6445b50259d4450b65cf4ddb1515f762f2 (diff)
downloadnextcloud-server-8ba67fbe1ec54dd961b8df9c0dda12efb5ca8ebb.tar.gz
nextcloud-server-8ba67fbe1ec54dd961b8df9c0dda12efb5ca8ebb.zip
Add test code for new image mime types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'tests/lib/Repair')
-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'],