Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrou committed Sep 5, 2022
1 parent f9321f2 commit 7ae7163
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Filesystem/FilesystemAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Http\UploadedFile;
use Illuminate\Testing\Assert;
use InvalidArgumentException;
use League\Flysystem\AwsS3V3\AwsS3V3Adapter;
use League\Flysystem\Filesystem;
use League\Flysystem\Ftp\FtpAdapter;
use League\Flysystem\Local\LocalFilesystemAdapter;
Expand Down Expand Up @@ -547,6 +548,17 @@ public function testProvidesTemporaryUrlsWithCustomCallback()
$this->assertTrue($filesystemAdapter->providesTemporaryUrls());
}

public function testProvidesTemporaryUrlsForS3Adapter()
{
$filesystem = new FilesystemManager(new Application);
$filesystemAdapter = $filesystem->createS3Driver([
'region' => 'us-west-1',
'bucket' => 'laravel',
]);

$this->assertTrue($filesystemAdapter->providesTemporaryUrls());
}

public function testProvidesTemporaryUrlsForAdapterWithoutTemporaryUrlSupport()
{
$filesystemAdapter = new FilesystemAdapter($this->filesystem, $this->adapter);
Expand Down

0 comments on commit 7ae7163

Please sign in to comment.