public function StreamWrapperTest::testSetDefaultConfig in AmazonS3 7.2
Test setting and getting the default configuration.
@covers \Drupal\amazons3\StreamWrapper::setDefaultConfig @covers \Drupal\amazons3\StreamWrapper::getDefaultConfig
File
- tests/
StreamWrapperTest.php, line 62
Class
Namespace
Drupal\amazons3TestCode
public function testSetDefaultConfig() {
$oldConfig = StreamWrapper::getDefaultConfig();
$config = StreamWrapperConfiguration::fromConfig([
'bucket' => 'bucket.example.com',
'region' => 'region',
'caching' => FALSE,
]);
StreamWrapper::setDefaultConfig($config);
$this
->assertSame($config, StreamWrapper::getDefaultConfig());
if ($oldConfig) {
StreamWrapper::setDefaultConfig($oldConfig);
}
}