summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNormal Ra <normalraw@gmail.com>2014-08-13 13:38:16 +0200
committerNormal Ra <normalraw@gmail.com>2014-08-13 13:38:16 +0200
commit8e11455f27d5efa6b95ccd695083697e0018e712 (patch)
tree8a21f785bf4d5f22a46d26e1c66e60255e01aa42
parent1c1fc0870a225201e7ff9878ea2c02ebca0edf9c (diff)
downloadnextcloud-server-8e11455f27d5efa6b95ccd695083697e0018e712.tar.gz
nextcloud-server-8e11455f27d5efa6b95ccd695083697e0018e712.zip
Add APK mimetype tests.
-rw-r--r--tests/lib/repair/repairmimetypes.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/lib/repair/repairmimetypes.php b/tests/lib/repair/repairmimetypes.php
index 3ed19bd55bb..7754864a69e 100644
--- a/tests/lib/repair/repairmimetypes.php
+++ b/tests/lib/repair/repairmimetypes.php
@@ -109,6 +109,33 @@ class TestRepairMimeTypes extends PHPUnit_Framework_TestCase {
}
/**
+ * Test renaming the APK mime type
+ */
+ public function testRenameAPKMimeType() {
+ $this->addEntries(
+ array(
+ array('test.apk', 'application/octet-stream'),
+ array('bogus.apk', 'application/vnd.android.package-archive'),
+ array('bogus2.apk', 'application/wrong'),
+ )
+ );
+
+ $this->repair->run();
+
+ // force mimetype reload
+ DummyFileCache::clearCachedMimeTypes();
+ $this->storage->getCache()->loadMimeTypes();
+
+ $this->checkEntries(
+ array(
+ array('test.apk', 'application/vnd.android.package-archive'),
+ array('bogus.apk', 'application/vnd.android.package-archive'),
+ array('bogus2.apk', 'application/vnd.android.package-archive'),
+ )
+ );
+ }
+
+ /**
* Test renaming and splitting old office mime types when
* new ones already exist
*/