UtilMimeTests.php 472 B

1234567891011121314151617181920
  1. <?php
  2. namespace League\Flysystem\Util;
  3. use PHPUnit\Framework\TestCase;
  4. class UtilMimeTests extends TestCase
  5. {
  6. public function testRetrievingAllMimetypes()
  7. {
  8. $map = MimeType::getExtensionToMimeTypeMap();
  9. $this->assertIsArray($map);
  10. $this->assertEquals('application/epub+zip', $map['epub']);
  11. }
  12. public function testNoExtension()
  13. {
  14. $this->assertEquals('text/plain', MimeType::detectByFileExtension('dir/file'));
  15. }
  16. }