Skip to content

Commit

Permalink
Add a unit test to check if case sensitive mime types extensions are …
Browse files Browse the repository at this point in the history
…guessed correctly
  • Loading branch information
Tony Vermeiren committed Apr 15, 2019
1 parent 5961456 commit 6a884c2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Binary file not shown.
Expand Up @@ -90,6 +90,19 @@ public function testGuessClientExtensionWithIncorrectMimeType()
$this->assertEquals('jpeg', $file->guessClientExtension());
}

public function testCaseSensitiveMimeType()
{
$file = new UploadedFile(
__DIR__.'/Fixtures/case-sensitive-mime-type.xlsm',
'test.xlsm',
'application/vnd.ms-excel.sheet.macroEnabled.12',
filesize(__DIR__.'/Fixtures/case-sensitive-mime-type.xlsm'),
null
);

$this->assertEquals('xlsm', $file->guessClientExtension());
}

public function testErrorIsOkByDefault()
{
$file = new UploadedFile(
Expand Down

0 comments on commit 6a884c2

Please sign in to comment.