/**
  * Return the mimetype of the file.
  *
  * @return string
  */
 public function getMimetype()
 {
     return Mimetypes::getInstance()->fromFilename($this->path) ?: 'text/plain';
 }
示例#2
0
 public function testReturnsNullWhenNoMatchFound()
 {
     $this->assertNull(Mimetypes::getInstance()->fromExtension('foobar'));
 }