Skip to content

Commit c4a8f50

Browse files
committed
Fix exception tests
1 parent ff5696b commit c4a8f50

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Tests/CommandTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace Orbitale\Component\ImageMagick\Tests;
1515

1616
use Orbitale\Component\ImageMagick\Command;
17+
use Orbitale\Component\ImageMagick\MagickBinaryNotFoundException;
1718

1819
class CommandTest extends AbstractTestCase
1920
{
@@ -34,13 +35,13 @@ public function testWrongConvertDirs($path, $expectedMessage, $expectedException
3435
$exceptionClass = \get_class($e);
3536
}
3637
static::assertContains($expectedMessage, $exception);
37-
static::assertEquals($exceptionClass, $expectedException);
38+
static::assertEquals($expectedException, $exceptionClass);
3839
}
3940

4041
public function provideWrongConvertDirs(): ?\Generator
4142
{
42-
yield ['/this/is/a/dummy/dir', 'The specified path (/this/is/a/dummy/dir) is not a file.', 'InvalidArgumentException'];
43-
yield ['./', 'The specified path (.) is not a file.', 'InvalidArgumentException'];
43+
yield ['/this/is/a/dummy/dir', 'The specified path (/this/is/a/dummy/dir) is not a file.', MagickBinaryNotFoundException::class];
44+
yield ['./', 'The specified path (.) is not a file.', MagickBinaryNotFoundException::class];
4445
}
4546

4647
public function testResizeImage(): void

0 commit comments

Comments
 (0)