Merge pull request #24614 from nextcloud/bugfix/noid/fix-imagick-tests

Skip the test if Imagick is misconfigured
This commit is contained in:
Julius Härtl 2020-12-09 13:56:00 +01:00 committed by GitHub
commit 3749b70699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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());