Skip to content

Commit d485109

Browse files
committed
Add functional test for async-aws
1 parent 9205bc7 commit d485109

5 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/Adapter/Builder/AbstractAdapterDefinitionBuilder.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ private function ensureRequiredPackagesAvailable()
5555
return;
5656
}
5757

58-
throw new MissingPackageException(sprintf(
59-
"Missing package%s, to use the \"%s\" adapter, run:\n\ncomposer require %s",
60-
\count($missingPackages) > 1 ? 's' : '',
61-
$this->getName(),
62-
implode(' ', $missingPackages)
63-
));
58+
throw new MissingPackageException(sprintf("Missing package%s, to use the \"%s\" adapter, run:\n\ncomposer require %s", \count($missingPackages) > 1 ? 's' : '', $this->getName(), implode(' ', $missingPackages)));
6459
}
6560
}

src/Adapter/Builder/AdapterDefinitionBuilderInterface.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ public function getName(): string;
2424

2525
/**
2626
* Create the definition for this builder's adapter given an array of options.
27-
*
28-
* @param array $options
29-
*
30-
* @return Definition
3127
*/
3228
public function createDefinition(array $options): Definition;
3329
}

tests/DependencyInjection/FlysystemExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Tests\League\FlysystemBundle\DependencyInjection;
1313

14+
use AsyncAws\S3\S3Client as AsyncS3Client;
1415
use Aws\S3\S3Client;
1516
use Google\Cloud\Storage\Bucket;
1617
use Google\Cloud\Storage\StorageClient;
@@ -28,6 +29,7 @@ class FlysystemExtensionTest extends TestCase
2829
public function provideFilesystems()
2930
{
3031
$fsNames = [
32+
'fs_asyncaws',
3133
'fs_aws',
3234
'fs_azure',
3335
'fs_cache',
@@ -105,6 +107,7 @@ private function getClientMocks()
105107

106108
return [
107109
'aws_client_service' => $this->createMock(S3Client::class),
110+
'asyncaws_client_service' => $this->createMock(AsyncS3Client::class),
108111
'azure_client_service' => $this->createMock(BlobRestProxy::class),
109112
'dropbox_client_service' => $this->createMock(DropboxClient::class),
110113
'gcloud_client_service' => $gcloud,

tests/Kernel/config/flysystem.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
flysystem:
22
storages:
3+
fs_asyncaws:
4+
adapter: 'asyncaws'
5+
options:
6+
client: 'asyncaws_client_service'
7+
bucket: '%env(AWS_BUCKET)%'
8+
prefix: 'optional/path/prefix'
9+
310
fs_aws:
411
adapter: 'aws'
512
options:

tests/Kernel/config/services.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
class: 'League\Flysystem\Adapter\NullAdapter'
77

88
# Aliases used to test the services construction
9+
flysystem.test.fs_asyncaws: { alias: 'fs_asyncaws' }
910
flysystem.test.fs_aws: { alias: 'fs_aws' }
1011
flysystem.test.fs_azure: { alias: 'fs_azure' }
1112
flysystem.test.fs_cache: { alias: 'fs_cache' }

0 commit comments

Comments
 (0)