本文整理汇总了PHP中Provider::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP Provider::setUp方法的具体用法?PHP Provider::setUp怎么用?PHP Provider::setUp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Provider
的用法示例。
在下文中一共展示了Provider::setUp方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
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();
}
示例2: setUp
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;
}
示例3: setUp
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;
}
示例4: setUp
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');
}
}
示例5: setUp
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');
}
}
示例6: setUp
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');
}
}