public function setUp() { parent::setUp(); $fileName = 'testimage.jpg'; $this->imgPath = $this->prepareTestFile($fileName, \OC::$SERVERROOT . '/tests/data/' . $fileName); $this->width = 1680; $this->height = 1050; $this->provider = new \OC\Preview\JPEG(); }
public function setUp() { parent::setUp(); $fileName = 'testimage.eps'; $this->imgPath = $this->prepareTestFile($fileName, \OC::$SERVERROOT . '/tests/data/' . $fileName); $this->width = 2400; $this->height = 1707; $this->provider = new \OC\Preview\Postscript; }
public function setUp() { parent::setUp(); $fileName = 'lorem-big.txt'; $this->imgPath = $this->prepareTestFile($fileName, \OC::$SERVERROOT . '/tests/data/' . $fileName); // Arbitrary width and length which won't be used to calculate the ratio $this->width = 500; $this->height = 200; $this->provider = new \OC\Preview\TXT; }
public function setUp() { $checkImagick = new \Imagick(); if (count($checkImagick->queryFormats('SVG')) === 1) { parent::setUp(); $fileName = 'testimagelarge.svg'; $this->imgPath = $this->prepareTestFile($fileName, \OC::$SERVERROOT . '/tests/data/' . $fileName); $this->width = 3000; $this->height = 2000; $this->provider = new \OC\Preview\SVG(); } else { $this->markTestSkipped('No SVG provider present'); } }
public function setUp() { $libreofficeBinary = \OC_Helper::findBinaryPath('libreoffice'); $openofficeBinary = $libreofficeBinary ? null : \OC_Helper::findBinaryPath('openoffice'); if ($libreofficeBinary || $openofficeBinary) { parent::setUp(); $fileName = 'testimage.odt'; $this->imgPath = $this->prepareTestFile($fileName, \OC::$SERVERROOT . '/tests/data/' . $fileName); $this->width = 595; $this->height = 842; $this->provider = new \OC\Preview\OpenDocument(); } else { $this->markTestSkipped('No Office provider present'); } }
public function setUp() { $avconvBinary = \OC_Helper::findBinaryPath('avconv'); $ffmpegBinary = $avconvBinary ? null : \OC_Helper::findBinaryPath('ffmpeg'); if ($avconvBinary || $ffmpegBinary) { parent::setUp(); \OC\Preview\Movie::$avconvBinary = $avconvBinary; \OC\Preview\Movie::$ffmpegBinary = $ffmpegBinary; $fileName = 'testimage.mp4'; $this->imgPath = $this->prepareTestFile($fileName, \OC::$SERVERROOT . '/tests/data/' . $fileName); $this->width = 560; $this->height = 320; $this->provider = new \OC\Preview\Movie(); } else { $this->markTestSkipped('No Movie provider present'); } }