From 7d74539d9a678f60a0d2d7ab21c3836fc8e4f8d7 Mon Sep 17 00:00:00 2001 From: ruff Date: Fri, 22 Sep 2023 21:28:39 +0200 Subject: [PATCH] Added more tests --- tests/testcases/MimeDbTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/testcases/MimeDbTest.php b/tests/testcases/MimeDbTest.php index d4d3b3a..60d49d6 100644 --- a/tests/testcases/MimeDbTest.php +++ b/tests/testcases/MimeDbTest.php @@ -92,6 +92,11 @@ public function testFindAllMimeTypesByExtension(): void $this->assertArrayNotHasKey(1, $this->mimeDb->findAllMimeTypesByExtension('.docx')); $this->assertEquals("application/vnd.openxmlformats-officedocument.wordprocessingml.document", $this->mimeDb->findAllMimeTypesByExtension('.docx')[0]); + $this->assertIsArray($this->mimeDb->findAllMimeTypesByExtension('docx')); + $this->assertArrayHasKey(0, $this->mimeDb->findAllMimeTypesByExtension('docx')); + $this->assertArrayNotHasKey(1, $this->mimeDb->findAllMimeTypesByExtension('docx')); + $this->assertEquals("application/vnd.openxmlformats-officedocument.wordprocessingml.document", $this->mimeDb->findAllMimeTypesByExtension('.docx')[0]); + $this->assertNull($this->mimeDb->findAllMimeTypesByExtension('.unknown')); }