public function StreamWrapperTest::testBasename in AmazonS3 7.2
@covers \Drupal\amazons3\StreamWrapper::getBasename
File
- tests/
StreamWrapperTest.php, line 346
Class
Namespace
Drupal\amazons3TestCode
public function testBasename() {
$config = StreamWrapperConfiguration::fromConfig([
'bucket' => 'bucket.example.com',
'region' => 'region',
'caching' => FALSE,
'expiration' => 0,
]);
$wrapper = new StreamWrapper($config);
$wrapper
->setUri('s3://bucket.example.com/force-download/test.jpg');
$this
->assertEquals('test.jpg', $wrapper
->getBasename());
}