Skip to content

Commit 3749b70

Browse files
authored
Merge pull request #24614 from nextcloud/bugfix/noid/fix-imagick-tests
Skip the test if Imagick is misconfigured
2 parents f318423 + d04b7cf commit 3749b70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/lib/Preview/Provider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ private function getPreview($provider) {
141141
$file = new File(\OC::$server->getRootFolder(), $this->rootView, $this->imgPath);
142142
$preview = $provider->getThumbnail($file, $this->maxWidth, $this->maxHeight, $this->scalingUp);
143143

144+
if (get_class($this) === BitmapTest::class && $preview === null) {
145+
$this->markTestSkipped('An error occured while operating with Imagick.');
146+
}
147+
144148
$this->assertNotEquals(false, $preview);
145149
$this->assertEquals(true, $preview->valid());
146150

0 commit comments

Comments
 (0)