From 42af646f484862c0f9e2b52eea67568c6eb57070 Mon Sep 17 00:00:00 2001 From: Joe Jiang Date: Mon, 11 May 2020 18:58:37 +0800 Subject: [PATCH] feat: Add test for empty string to MimeType::get --- tests/Helpers/MimeTypeTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Helpers/MimeTypeTest.php b/tests/Helpers/MimeTypeTest.php index fe8c031d..1dd9e7dd 100644 --- a/tests/Helpers/MimeTypeTest.php +++ b/tests/Helpers/MimeTypeTest.php @@ -14,6 +14,14 @@ public function testGet() $this->assertEquals($mimetype, 'text/css'); } + + public function testGetWithEmptyString() + { + $extension = ''; + $mimetype = MimeType::get($extension); + + $this->assertEquals($mimetype, 'application/octet-stream'); + } public function testFrom() {