Exemplo n.º 1
0
	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();
	}
Exemplo n.º 2
0
	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;
	}
Exemplo n.º 3
0
	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;
	}
Exemplo n.º 4
0
Arquivo: svg.php Projeto: evanjt/core
 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');
     }
 }
Exemplo n.º 5
0
 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');
     }
 }
Exemplo n.º 6
0
 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');
     }
 }