Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing import to FilesystemAdapter #33

Merged
merged 2 commits into from
May 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add test for FilesystemAdapter checking the runtime exception is thro…
…wn when trying to get temporary url on a local disk
  • Loading branch information
Eric Pfeiffer committed May 19, 2021
commit 633b6c6340020dc343098702e84eccd60aaa5bb7
17 changes: 17 additions & 0 deletions tests/FilesystemAdapterTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem as Flysystem;
use Winter\Storm\Filesystem\FilesystemAdapter;

class FilesystemAdapterTest extends TestCase
{
public function test_it_throws_an_exception_when_trying_to_get_a_temporary_url_on_a_local_disk()
{
$flysystem = new Flysystem(new Local('/tmp/app'));

$this->expectException(RuntimeException::class);

(new FilesystemAdapter($flysystem))->temporaryUrl('test.jpg', \Carbon\Carbon::now()->addMinutes(5));
}
}