Skip to content

Commit 044ccbb

Browse files
authored
Merge pull request #6011 from kenjis/fix-ImageMagickHandlerTest
test: change Config\Images::$libraryPath only when the file exists
2 parents ab2b186 + 70c05ba commit 044ccbb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/system/Images/ImageMagickHandlerTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ protected function setUp(): void
4747

4848
$this->path = $this->origin . 'ci-logo.png';
4949

50-
$handlerConfig = new Images();
51-
$handlerConfig->libraryPath = '/usr/bin/convert';
52-
$this->handler = Services::image('imagick', $handlerConfig, false);
50+
$handlerConfig = new Images();
51+
if (is_file('/usr/bin/convert')) {
52+
$handlerConfig->libraryPath = '/usr/bin/convert';
53+
}
54+
$this->handler = Services::image('imagick', $handlerConfig, false);
5355
}
5456

5557
public function testGetVersion()

0 commit comments

Comments
 (0)