Add APK mimetype tests.
This commit is contained in:
parent
1c1fc0870a
commit
8e11455f27
1 changed files with 27 additions and 0 deletions
|
@ -108,6 +108,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
|
* Test renaming and splitting old office mime types when
|
||||||
* new ones already exist
|
* new ones already exist
|
||||||
|
|
Loading…
Reference in a new issue