예제 #1
0
 public function testSaveFailureUnknownMimeType()
 {
     $srcPath = $this->testFiles['jpeg'];
     $dstPath = $this->getTempPath();
     $handler = new ezcImageGdHandler(ezcImageGdHandler::defaultSettings());
     $ref = $handler->load($srcPath);
     try {
         $handler->save($ref, $dstPath, 'text/plain');
         $this->fail('Exception not thrown on save with invalid MIME type.');
     } catch (ezcImageMimeTypeUnsupportedException $e) {
     }
     $handler->close($ref);
 }