aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-08-15 14:41:53 +0200
committerLukas Reschke <lukas@owncloud.com>2014-08-15 14:41:53 +0200
commit98fc56831d4f7131a50b62b770ba265df5817ee4 (patch)
tree533f5a33016f3130f898a79b82931876ae1c9a3c /tests
parenta6fff70a7cb591b8b011af5da0e2367d9739ff84 (diff)
parent8e11455f27d5efa6b95ccd695083697e0018e712 (diff)
downloadnextcloud-server-98fc56831d4f7131a50b62b770ba265df5817ee4.tar.gz
nextcloud-server-98fc56831d4f7131a50b62b770ba265df5817ee4.zip
Merge pull request #9275 from NormalRa/master
Add .apk mimetype.
Diffstat (limited to '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
*/