Skip the test if Imagick is misconfigured

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-12-09 09:07:20 +01:00
parent 6f83546358
commit d04b7cf03d
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
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());