Noting this code snippet from Laracasts by Korridor that I found really useful for mocking the Storage temporaryUrl
for local development.
$fakeFilesystem = Storage::fake('somediskname');
$proxyMockedFakeFilesystem = Mockery::mock($fakeFilesystem);
$proxyMockedFakeFilesystem->shouldReceive('temporaryUrl')
->andReturn('<http://some-signed-url.test>');
Storage::set('somediskname', $proxyMockedFakeFilesystem);
He commented that:
Now
Storage::disk('somediskname')->temporaryUrl('somefile.png', now()->addMinutes(20))
This returns http://some-signed-url.test and I can actually store files in the temporary filesystem that Storage::fake() provides without any further changes.