From 5521231095026d0a9f35b90033bed3550bf54096 Mon Sep 17 00:00:00 2001 From: kldio Date: Mon, 9 Mar 2020 20:35:16 +0200 Subject: [PATCH] Pass config array to Filesystem --- src/AzureStorageServiceProvider.php | 2 +- tests/ServiceProviderTest.php | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/AzureStorageServiceProvider.php b/src/AzureStorageServiceProvider.php index 89a0025..2254a2c 100644 --- a/src/AzureStorageServiceProvider.php +++ b/src/AzureStorageServiceProvider.php @@ -32,7 +32,7 @@ public function boot() $config['url'] ?? null, $config['prefix'] ?? null ); - return new Filesystem($adapter); + return new Filesystem($adapter, $config); }); } diff --git a/tests/ServiceProviderTest.php b/tests/ServiceProviderTest.php index 29e91f3..61f362e 100644 --- a/tests/ServiceProviderTest.php +++ b/tests/ServiceProviderTest.php @@ -14,4 +14,15 @@ public function it_sets_up_the_storage_correctly() $this->assertEquals('azure', $storage->getDefaultDriver()); $this->assertEquals('azure', $storage->getDefaultCloudDriver()); } + + /** @test */ + public function it_sets_up_the_config_correctly() + { + $storage = $this->app['filesystem']; + $settings = $this->app['config']->get('filesystems.disks.azure'); + + foreach($settings as $key => $value){ + $this->assertEquals($value, $storage->getConfig()->get($key)); + } + } }