summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-10-02 15:28:03 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2015-10-02 16:06:56 +0200
commitc80dd82fe4c197cb09344a2ce25f790cd597b792 (patch)
treec174878a794f790ee40be0a68eb6af5e510e49ff /tests
parent57ceee13a964ac949717891e13af1990779ad841 (diff)
downloadnextcloud-server-c80dd82fe4c197cb09344a2ce25f790cd597b792.tar.gz
nextcloud-server-c80dd82fe4c197cb09344a2ce25f790cd597b792.zip
Added mimetype repair step
* Version number increased
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/repair/repairmimetypes.php72
1 files changed, 72 insertions, 0 deletions
diff --git a/tests/lib/repair/repairmimetypes.php b/tests/lib/repair/repairmimetypes.php
index 3c100b808cf..0288a476ede 100644
--- a/tests/lib/repair/repairmimetypes.php
+++ b/tests/lib/repair/repairmimetypes.php
@@ -283,6 +283,68 @@ class RepairMimeTypes extends \Test\TestCase {
}
/**
+ * Test renaming the java mime types
+ */
+ public function testRenameJavaMimeType() {
+ $currentMimeTypes = [
+ ['test.java', 'application/octet-stream'],
+ ['test.class', 'application/octet-stream'],
+ ];
+
+ $fixedMimeTypes = [
+ ['test.java', 'text/x-java-source'],
+ ['test.class', 'application/java'],
+ ];
+
+ $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
+ }
+
+ /**
+ * Test renaming the hpp mime type
+ */
+ public function testRenameHppMimeType() {
+ $currentMimeTypes = [
+ ['test.hpp', 'application/octet-stream'],
+ ];
+
+ $fixedMimeTypes = [
+ ['test.hpp', 'text/x-h'],
+ ];
+
+ $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
+ }
+
+ /**
+ * Test renaming the rss mime type
+ */
+ public function testRenameRssMimeType() {
+ $currentMimeTypes = [
+ ['test.rss', 'application/octet-stream'],
+ ];
+
+ $fixedMimeTypes = [
+ ['test.rss', 'application/rss+xml'],
+ ];
+
+ $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
+ }
+
+ /**
+ * Test renaming the hpp mime type
+ */
+ public function testRenameRtfMimeType() {
+ $currentMimeTypes = [
+ ['test.rtf', 'application/octet-stream'],
+ ];
+
+ $fixedMimeTypes = [
+ ['test.rtf', 'text/rtf'],
+ ];
+
+ $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);
+ }
+
+ /**
* Test renaming and splitting old office mime types when
* new ones already exist
*/
@@ -399,6 +461,11 @@ class RepairMimeTypes extends \Test\TestCase {
['test.cnf', 'text/plain'],
['test.yaml', 'application/yaml'],
['test.yml', 'application/yaml'],
+ ['test.java', 'text/x-java-source'],
+ ['test.class', 'application/java'],
+ ['test.hpp', 'text/x-h'],
+ ['test.rss', 'application/rss+xml'],
+ ['test.rtf', 'text/rtf'],
];
$fixedMimeTypes = [
@@ -438,6 +505,11 @@ class RepairMimeTypes extends \Test\TestCase {
['test.cnf', 'text/plain'],
['test.yaml', 'application/yaml'],
['test.yml', 'application/yaml'],
+ ['test.java', 'text/x-java-source'],
+ ['test.class', 'application/java'],
+ ['test.hpp', 'text/x-h'],
+ ['test.rss', 'application/rss+xml'],
+ ['test.rtf', 'text/rtf'],
];
$this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes);