public function StreamWrapperTest::testExternalImageStyleUri in AmazonS3 7.2
Test when an image doesn't exist that we return the internal style URL.
@covers \Drupal\amazons3\StreamWrapper::getExternalUrl
File
- tests/
StreamWrapperTest.php, line 199
Class
Namespace
Drupal\amazons3TestCode
public function testExternalImageStyleUri() {
$wrapper = new StreamWrapper();
$wrapper
->setUri('s3://bucket.example.com/styles/thumbnail/image.jpg');
$this
->assertEquals('http://amazons3.example.com/' . StreamWrapper::stylesCallback . '/bucket.example.com/styles/thumbnail/image.jpg', $wrapper
->getExternalUrl());
}