aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/IntegrityCheck/CheckerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/IntegrityCheck/CheckerTest.php')
-rw-r--r--tests/lib/IntegrityCheck/CheckerTest.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php
index c5a4f255397..8414a531464 100644
--- a/tests/lib/IntegrityCheck/CheckerTest.php
+++ b/tests/lib/IntegrityCheck/CheckerTest.php
@@ -713,7 +713,9 @@ class CheckerTest extends TestCase {
*/
public function testVerifyCoreSignatureWithModifiedMimetypelistSignatureData(): void {
$shippedMimetypeAliases = (array)json_decode(file_get_contents(\OC::$SERVERROOT . '/resources/config/mimetypealiases.dist.json'));
+ $shippedMimetypeNames = (array)json_decode(file_get_contents(\OC::$SERVERROOT . '/resources/config/mimetypenames.dist.json'));
$allAliases = array_merge($shippedMimetypeAliases, ['my-custom/mimetype' => 'custom']);
+ $allMimetypeNames = array_merge($shippedMimetypeNames, ['my-custom/mimetype' => 'Custom Document']);
$this->mimeTypeDetector
->method('getOnlyDefaultAliases')
@@ -723,9 +725,14 @@ class CheckerTest extends TestCase {
->method('getAllAliases')
->willReturn($allAliases);
+ $this->mimeTypeDetector
+ ->method('getAllNamings')
+ ->willReturn($allMimetypeNames);
+
$oldMimetypeList = new GenerateMimetypeFileBuilder();
$all = $this->mimeTypeDetector->getAllAliases();
- $newFile = $oldMimetypeList->generateFile($all);
+ $namings = $this->mimeTypeDetector->getAllNamings();
+ $newFile = $oldMimetypeList->generateFile($all, $namings);
// When updating the mimetype list the test assets need to be updated as well
// 1. Update core/js/mimetypelist.js with the new generated js by running the test with the next line uncommented: