diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-02 17:50:34 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-02 17:50:34 +0200 |
commit | ff89824135298aa072c56f5a811f453df7ac3fe4 (patch) | |
tree | 43fa2941d995a6175c4918324cd0e91c775bf84f /tests | |
parent | fee8486b7f50422958909abe9fa1305039ecbbab (diff) | |
parent | c80dd82fe4c197cb09344a2ce25f790cd597b792 (diff) | |
download | nextcloud-server-ff89824135298aa072c56f5a811f453df7ac3fe4.tar.gz nextcloud-server-ff89824135298aa072c56f5a811f453df7ac3fe4.zip |
Merge pull request #19272 from owncloud/mimetypes-enhanced
Introduce a few new mimetypes for code, fix recursive mimetype aliases
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/repair/repairmimetypes.php | 72 |
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); |