Beispiel #1
0
 /**
  * Test mime()
  *
  * @return void
  */
 public function testMime()
 {
     $this->skipIf(!function_exists('finfo_open') && !function_exists('mime_content_type'), 'Not able to read mime type');
     $path = TEST_APP . 'webroot/img/cake.power.gif';
     $file = new File($path);
     $expected = 'image/gif';
     if (function_exists('mime_content_type') && mime_content_type($file->pwd()) === false) {
         $expected = false;
     }
     $this->assertEquals($expected, $file->mime());
 }