aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-12-09 13:56:00 +0100
committerGitHub <noreply@github.com>2020-12-09 13:56:00 +0100
commit3749b706993107291321643aee0d874a9210a2d0 (patch)
tree6dc5de9762867b526ed7cd80d4674e5c918b7120
parentf3184238407d30a95dfb69ab5e68ec68a2d4d3e6 (diff)
parentd04b7cf03d910be63fd90991dde212c93c0e9ca1 (diff)
downloadnextcloud-server-3749b706993107291321643aee0d874a9210a2d0.tar.gz
nextcloud-server-3749b706993107291321643aee0d874a9210a2d0.zip
Merge pull request #24614 from nextcloud/bugfix/noid/fix-imagick-tests
Skip the test if Imagick is misconfigured
-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());