コード例 #1
0
 /**
  * Tests that the renditions for a movie get generated and saved.
  */
 function testMovieRenditions()
 {
     $dir = self::$BUCKET . 'tmpdir/';
     mkdir($dir, 0755, true);
     copy(realpath(dirname(__FILE__) . '/../res/swiss-kurier.swf'), $dir . 'swiss.swf');
     $renditions = binarypool_render::render('MOVIE', 'test', $dir . 'swiss.swf', $dir);
     // No renditions
     $this->assertEqual($renditions, array());
 }
コード例 #2
0
ファイル: storage.php プロジェクト: pneff/binarypool
 private function generateRenditions($type, $dir, $originalFile, $files, $assetFile, $assetObj)
 {
     $exclude = array_keys($files);
     if ($assetObj !== null) {
         $exclude = array_merge(array_keys($assetObj->getRenditions()));
     }
     $outputDir = $this->storage->getRenditionsDirectory($dir);
     $renditions = binarypool_render::render($type, $this->bucketName, $originalFile, $outputDir, $exclude, $assetFile);
     return $this->storage->saveRenditions($renditions, $dir);
 }