Skip to content

Commit

Permalink
Fixes non-existent image reading test that passes a wrong argument
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondobama committed Feb 4, 2024
1 parent 2d35593 commit 53a9d2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Facades/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class Image extends Facade
{
protected static function getFacadeAccessor(): string
protected static function getFacadeAccessor()
{
return 'image';
}
Expand Down
5 changes: 3 additions & 2 deletions tests/FacadeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Error;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use Intervention\Image\Exceptions\DecoderException;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Laravel\Facades\Image;
use ReflectionClass;
Expand Down Expand Up @@ -40,9 +41,9 @@ public function testReadAnImage(): void

public function testThrowsExceptionWhenReadingNonExistentImage(): void
{
$this->expectException(Error::class);
$this->expectException(DecoderException::class);
$input = 'path/to/non_existent_image.jpg';
Image::read(null, $input);
Image::read($input);
}

public function testCreateAnImage(): void
Expand Down

0 comments on commit 53a9d2e

Please sign in to comment.