mimeType() public static méthode

Returns mime type for the given file path.
public static mimeType ( string $path ) : string
$path string
Résultat string
Exemple #1
0
 /**
  * @test
  */
 public function shouldReturnMimeType()
 {
     //given
     $path = Path::join(ROOT_PATH, 'test', 'resources', 'logo.png');
     //when
     $mimeType = Files::mimeType($path);
     //then
     $this->assertEquals('image/png', $mimeType);
 }