Skip to content

Commit a92b57e

Browse files
committed
Adapt DI test
1 parent c093a7e commit a92b57e

1 file changed

Lines changed: 20 additions & 21 deletions

File tree

tests/DependencyInjection/FlysystemExtensionTest.php

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
use Google\Cloud\Storage\Bucket;
1717
use Google\Cloud\Storage\StorageClient;
1818
use League\Flysystem\FilesystemInterface;
19+
use League\Flysystem\FilesystemOperator;
1920
use MicrosoftAzure\Storage\Blob\BlobRestProxy;
2021
use OpenCloud\ObjectStore\Resource\Container;
2122
use PHPUnit\Framework\TestCase;
22-
use Sabre\DAV\Client as WebDAVClient;
23-
use Spatie\Dropbox\Client as DropboxClient;
2423
use Symfony\Component\Dotenv\Dotenv;
2524
use Symfony\Component\HttpKernel\Kernel;
2625
use Tests\League\FlysystemBundle\Kernel\FlysystemAppKernel;
@@ -31,19 +30,19 @@ public function provideFilesystems()
3130
{
3231
$fsNames = [
3332
'fs_aws',
34-
'fs_azure',
35-
'fs_cache',
36-
'fs_custom',
37-
'fs_dropbox',
33+
// 'fs_azure',
34+
// 'fs_cache',
35+
// 'fs_custom',
36+
// 'fs_dropbox',
3837
'fs_ftp',
39-
'fs_gcloud',
40-
'fs_lazy',
38+
// 'fs_gcloud',
39+
// 'fs_lazy',
4140
'fs_local',
42-
'fs_rackspace',
43-
'fs_replicate',
41+
// 'fs_rackspace',
42+
// 'fs_replicate',
4443
'fs_sftp',
45-
'fs_webdav',
46-
'fs_zip',
44+
// 'fs_webdav',
45+
// 'fs_zip',
4746
];
4847

4948
foreach ($fsNames as $fsName) {
@@ -61,7 +60,7 @@ public function testFileystems(string $fsName)
6160

6261
$fs = $container->get('flysystem.test.'.$fsName);
6362

64-
$this->assertInstanceOf(FilesystemInterface::class, $fs, 'Filesystem "'.$fsName.'" should be an instance of FilesystemInterface');
63+
$this->assertInstanceOf(FilesystemOperator::class, $fs, 'Filesystem "'.$fsName.'" should be an instance of FilesystemInterface');
6564
$this->assertEquals('plugin', $fs->pluginTest());
6665
}
6766

@@ -79,7 +78,7 @@ public function testTaggedCollection(string $fsName)
7978

8079
$storages = iterator_to_array($container->get('storages_tagged_collection')->locator);
8180

82-
$this->assertInstanceOf(FilesystemInterface::class, $storages[$fsName]);
81+
$this->assertInstanceOf(FilesystemOperator::class, $storages[$fsName]);
8382
$this->assertEquals('plugin', $storages[$fsName]->pluginTest());
8483
}
8584

@@ -107,8 +106,8 @@ private function createFysystemKernel()
107106

108107
private function getClientMocks()
109108
{
110-
$gcloud = $this->createMock(StorageClient::class);
111-
$gcloud->method('bucket')->willReturn($this->createMock(Bucket::class));
109+
// $gcloud = $this->createMock(StorageClient::class);
110+
// $gcloud->method('bucket')->willReturn($this->createMock(Bucket::class));
112111

113112
$asyncAws = null;
114113
if (Kernel::VERSION_ID > 50200 && class_exists(AsyncS3Client::class)) {
@@ -118,11 +117,11 @@ private function getClientMocks()
118117
return [
119118
'aws_client_service' => $this->createMock(S3Client::class),
120119
'asyncaws_client_service' => $asyncAws,
121-
'azure_client_service' => $this->createMock(BlobRestProxy::class),
122-
'dropbox_client_service' => $this->createMock(DropboxClient::class),
123-
'gcloud_client_service' => $gcloud,
124-
'rackspace_container_service' => $this->createMock(Container::class),
125-
'webdav_client_service' => $this->createMock(WebDAVClient::class),
120+
// 'azure_client_service' => $this->createMock(BlobRestProxy::class),
121+
// 'dropbox_client_service' => $this->createMock(DropboxClient::class),
122+
// 'gcloud_client_service' => $gcloud,
123+
// 'rackspace_container_service' => $this->createMock(Container::class),
124+
// 'webdav_client_service' => $this->createMock(WebDAVClient::class),
126125
];
127126
}
128127
}

0 commit comments

Comments
 (0)