diff --git a/tests/Http/Controllers/Api/StorageRequestFileControllerTest.php b/tests/Http/Controllers/Api/StorageRequestFileControllerTest.php index 058732c..dcbd4cf 100644 --- a/tests/Http/Controllers/Api/StorageRequestFileControllerTest.php +++ b/tests/Http/Controllers/Api/StorageRequestFileControllerTest.php @@ -9,6 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Bus; use Mockery; +use RuntimeException; use Storage; class StorageRequestFileControllerTest extends ApiTestCase @@ -256,6 +257,10 @@ public function testShow() { config(['user_storage.pending_disk' => 'test']); $disk = Storage::fake('test'); + $disk->buildTemporaryUrlsUsing(function () { + // Act as if the storage disk driver does not support temporary URLs. + throw new RuntimeException; + }); $disk->put("request-{$id}/a.jpg", 'abc'); $disk->put("request-{$id}/c.jpg", 'abc'); @@ -282,6 +287,10 @@ public function testShowApproved() { config(['user_storage.storage_disk' => 'test']); $disk = Storage::fake('test'); + $disk->buildTemporaryUrlsUsing(function () { + // Act as if the storage disk driver does not support temporary URLs. + throw new RuntimeException; + }); $disk->put("user-{$request->user_id}/a.jpg", 'abc'); $this->beGlobalAdmin(); @@ -311,6 +320,10 @@ public function testShowUrlEncode() { config(['user_storage.pending_disk' => 'test']); $disk = Storage::fake('test'); + $disk->buildTemporaryUrlsUsing(function () { + // Act as if the storage disk driver does not support temporary URLs. + throw new RuntimeException; + }); $disk->put("request-{$id}/my dir/a.jpg", 'abc'); $this->beGlobalAdmin();