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