public function testGetMimeType() { $file = new \r8\FileSys\File(); try { $file->getMimeType(); $this->fail("An expected exception was not thrown"); } catch (\r8\Exception\FileSystem\Missing $err) { $this->assertSame("Path does not exist", $err->getMessage()); } $file->setPath($this->file); $this->assertSame("text/plain", $file->getMimeType()); // Copy the contents of a gif in to the file file_put_contents($this->file, base64_decode("R0lGODdhAQABAIAAAP///////ywAAAAAAQABAAACAkQBADs="), FILE_BINARY); $this->assertSame("image/gif", $file->getMimeType()); }