getMimetype() public method

Get mimetype of a file.
public getMimetype ( string $path ) : string
$path string
return string
コード例 #1
0
 /**
  *
  */
 public function testApiGetMimetype_ThrowsException_WhenGetMetadataOnModelThrowsException()
 {
     $path = 'path';
     $expected = new Exception();
     $ex = null;
     $this->expect('getMimetype', [$path])->willThrow($expected);
     try {
         $this->fs->getMimetype($path);
     } catch (Exception $ex) {
     }
     $this->assertInstanceOf(ReadException::class, $ex);
     $this->assertSame($expected, $ex->getPrevious());
 }