Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-12-09 11:07:20 +0300
committerRobin Appelman <robin@icewind.nl>2021-06-07 21:56:42 +0300
commitb486855783c38cd857f233485187a7a31ba0fe47 (patch)
treec66b044395f175b07c51f8dc90f11daf3a3d6214 /tests
parentb92440ca0af806e89703ca90751cf95635f08a4d (diff)
Skip the test if Imagick is misconfigured
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Preview/Provider.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/lib/Preview/Provider.php b/tests/lib/Preview/Provider.php
index 761f6b7f83f..90287116512 100644
--- a/tests/lib/Preview/Provider.php
+++ b/tests/lib/Preview/Provider.php
@@ -141,6 +141,10 @@ abstract class Provider extends \Test\TestCase {
$file = new File(\OC::$server->getRootFolder(), $this->rootView, $this->imgPath);
$preview = $provider->getThumbnail($file, $this->maxWidth, $this->maxHeight, $this->scalingUp);
+ if (get_class($this) === BitmapTest::class && $preview === null) {
+ $this->markTestSkipped('An error occured while operating with Imagick.');
+ }
+
$this->assertNotEquals(false, $preview);
$this->assertEquals(true, $preview->valid());