You are here

public function StreamWrapperTest::testExternalUriEmptyPathSegments in AmazonS3 7.2

Test that we can call getExternalUrl() when no key has been specified.

@covers \Drupal\amazons3\StreamWrapper::getExternalUrl

File

tests/StreamWrapperTest.php, line 224

Class

StreamWrapperTest
Tests \Drupal\amazons3\StreamWrapper.

Namespace

Drupal\amazons3Test

Code

public function testExternalUriEmptyPathSegments() {
  $wrapper = new StreamWrapper();
  $wrapper
    ->setUri('s3://bucket.example.com/');
  $this
    ->assertEquals('https://s3.amazonaws.com/bucket.example.com', $wrapper
    ->getExternalUrl());
}