Skip to content

Commit

Permalink
Fix exception tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Mar 5, 2019
1 parent ff5696b commit c4a8f50
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Tests/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace Orbitale\Component\ImageMagick\Tests;

use Orbitale\Component\ImageMagick\Command;
use Orbitale\Component\ImageMagick\MagickBinaryNotFoundException;

class CommandTest extends AbstractTestCase
{
Expand All @@ -34,13 +35,13 @@ public function testWrongConvertDirs($path, $expectedMessage, $expectedException
$exceptionClass = \get_class($e);
}
static::assertContains($expectedMessage, $exception);
static::assertEquals($exceptionClass, $expectedException);
static::assertEquals($expectedException, $exceptionClass);
}

public function provideWrongConvertDirs(): ?\Generator
{
yield ['/this/is/a/dummy/dir', 'The specified path (/this/is/a/dummy/dir) is not a file.', 'InvalidArgumentException'];
yield ['./', 'The specified path (.) is not a file.', 'InvalidArgumentException'];
yield ['/this/is/a/dummy/dir', 'The specified path (/this/is/a/dummy/dir) is not a file.', MagickBinaryNotFoundException::class];
yield ['./', 'The specified path (.) is not a file.', MagickBinaryNotFoundException::class];
}

public function testResizeImage(): void
Expand Down

0 comments on commit c4a8f50

Please sign in to comment.