public function StreamWrapperTest::testReducedRedundancyStorage in AmazonS3 7.2
@covers \Drupal\amazons3\StreamWrapper::getOptions @covers \Drupal\amazons3\StreamWrapper::useRrs
File
- tests/
StreamWrapperTest.php, line 533
Class
Namespace
Drupal\amazons3TestCode
public function testReducedRedundancyStorage() {
$config = StreamWrapperConfiguration::fromConfig([
'bucket' => 'bucket.example.com',
'region' => 'region',
'caching' => FALSE,
'reducedRedundancyPaths' => new MatchablePaths(BasicPath::factory(array(
'*',
))),
]);
$wrapper = new StreamWrapper($config);
$wrapper
->setUri('s3://bucket.example.com/styles/thumbnail/image.jpg');
$options = $wrapper
->getOptions();
$this
->assertArrayHasKey('StorageClass', $options);
$this
->assertEquals('REDUCED_REDUNDANCY', $options['StorageClass']);
}