Skip to content

Commit 40b09d4

Browse files
committed
test: add possibility to test onto live storage
1 parent 337d57b commit 40b09d4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/FlysystemTestSuite.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace PlatformCommunity\Flysystem\BunnyCDN\Tests;
44

5-
use Faker\Provider\File;
65
use GuzzleHttp\Psr7\Response;
76
use League\Flysystem\AdapterTestUtilities\FilesystemAdapterTestCase;
87
use League\Flysystem\Config;
@@ -72,6 +71,12 @@ private static function bunnyCDNClient(): BunnyCDNClient
7271
return static::$bunnyCDNClient;
7372
}
7473

74+
if (isset($_SERVER['STORAGEZONE'], $_SERVER['APIKEY'])) {
75+
static::$bunnyCDNClient = new BunnyCDNClient($_SERVER['STORAGEZONE'], $_SERVER['APIKEY']);
76+
77+
return static::$bunnyCDNClient;
78+
}
79+
7580
$filesystem = new Filesystem(new InMemoryFilesystemAdapter());
7681

7782
$mock_client = Mockery::mock(new BunnyCDNClient(self::STORAGE_ZONE, 'api-key'));

0 commit comments

Comments
 (0)