diff --git a/composer.json b/composer.json index 81d9f3d..d71a14d 100644 --- a/composer.json +++ b/composer.json @@ -33,11 +33,11 @@ "require": { "php": "^7.2.5", "illuminate/support": "^6.0|^7.0", - "spatie/laravel-medialibrary": "^7.0" + "spatie/laravel-medialibrary": "^7.19" }, "require-dev": { "phpunit/phpunit": "^8.5", - "orchestra/testbench": "~4.0" + "orchestra/testbench": "~4.0|~5.0" }, "autoload": { "classmap": [], diff --git a/tests/Feature/FileUploaderTest.php b/tests/Feature/FileUploaderTest.php index 2103b27..42f246f 100644 --- a/tests/Feature/FileUploaderTest.php +++ b/tests/Feature/FileUploaderTest.php @@ -16,7 +16,7 @@ public function a_user_can_upload_file() 'name' => 'test', 'path' => $this->getTestFilesDirectory('test.psd'), ]; - $file = new UploadedFile($data['path'], $data['name'], 'image/jpeg', filesize($data['path']), null, true); + $file = new UploadedFile($data['path'], $data['name'], 'image/jpeg', null, true); $response = $this->call('POST', 'upload', $data, [], ['file' => $file], [], []); $response->assertStatus(200); diff --git a/tests/TestCase.php b/tests/TestCase.php index 1b3ccc2..6fc9240 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -15,6 +15,7 @@ use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Gate; use Orchestra\Testbench\TestCase as Orchestra; +use Throwable; use Spatie\MediaLibrary\MediaLibraryServiceProvider; abstract class TestCase extends Orchestra @@ -242,12 +243,12 @@ public function __construct() { } - public function report(Exception $e) + public function report(Throwable $e) { // no-op } - public function render($request, Exception $e) + public function render($request, Throwable $e) { throw $e; }