diff options
author | Olivier Paroz <github@oparoz.com> | 2015-04-02 21:37:57 +0200 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-04-02 21:37:57 +0200 |
commit | 70ec74e88b0b1b73fd0a60116864f9d81f382b15 (patch) | |
tree | 7faf73eeff919a9ade1e43f67fd9c4837b09d1b3 /tests/lib/repair | |
parent | fa079a5959f1c67b1b6bd7b9d4aa98763b817394 (diff) | |
download | nextcloud-server-70ec74e88b0b1b73fd0a60116864f9d81f382b15.tar.gz nextcloud-server-70ec74e88b0b1b73fd0a60116864f9d81f382b15.zip |
Introducing media types for yml, yaml, cnf, conf
Diffstat (limited to 'tests/lib/repair')
-rw-r--r-- | tests/lib/repair/repairmimetypes.php | 53 |
1 files changed, 49 insertions, 4 deletions
diff --git a/tests/lib/repair/repairmimetypes.php b/tests/lib/repair/repairmimetypes.php index efae25f7e7a..40ffc14612b 100644 --- a/tests/lib/repair/repairmimetypes.php +++ b/tests/lib/repair/repairmimetypes.php @@ -221,15 +221,52 @@ class RepairMimeTypes extends \Test\TestCase { $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes); } + /** + * Test renaming the 3D image media type + */ public function testRename3dImagesMimeType() { $currentMimeTypes = [ - ['test.eps', 'application/octet-stream'], - ['test.ps', 'application/octet-stream'], + ['test.jps', 'application/octet-stream'], + ['test.mpo', 'application/octet-stream'], ]; $fixedMimeTypes = [ - ['test.eps', 'application/postscript'], - ['test.ps', 'application/postscript'], + ['test.jps', 'image/jpeg'], + ['test.mpo', 'image/jpeg'], + ]; + + $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes); + } + + /** + * Test renaming the conf/cnf media type + */ + public function testRenameConfMimeType() { + $currentMimeTypes = [ + ['test.conf', 'application/octet-stream'], + ['test.cnf', 'application/octet-stream'], + ]; + + $fixedMimeTypes = [ + ['test.conf', 'text/plain'], + ['test.cnf', 'text/plain'], + ]; + + $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes); + } + + /** + * Test renaming the yaml media type + */ + public function testRenameYamlMimeType() { + $currentMimeTypes = [ + ['test.yaml', 'application/octet-stream'], + ['test.yml', 'application/octet-stream'], + ]; + + $fixedMimeTypes = [ + ['test.yaml', 'application/yaml'], + ['test.yml', 'application/yaml'], ]; $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes); @@ -348,6 +385,10 @@ class RepairMimeTypes extends \Test\TestCase { ['test.DNG', 'image/x-dcraw'], ['test.jps', 'image/jpeg'], ['test.MPO', 'image/jpeg'], + ['test.conf', 'text/plain'], + ['test.cnf', 'text/plain'], + ['test.yaml', 'application/yaml'], + ['test.yml', 'application/yaml'], ]; $fixedMimeTypes = [ @@ -383,6 +424,10 @@ class RepairMimeTypes extends \Test\TestCase { ['test.DNG', 'image/x-dcraw'], ['test.jps', 'image/jpeg'], ['test.MPO', 'image/jpeg'], + ['test.conf', 'text/plain'], + ['test.cnf', 'text/plain'], + ['test.yaml', 'application/yaml'], + ['test.yml', 'application/yaml'], ]; $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes); |