You are here

public function HttpStreamWrapperTest::testUri in Remote Stream Wrapper 8

Test URI methods.

@covers ::setUri @covers ::getUri @covers ::getExternalUrl @covers ::realpath

File

tests/src/Unit/HttpStreamWrapperTest.php, line 51

Class

HttpStreamWrapperTest
@group remote_stream_wrapper @coversDefaultClass \Drupal\remote_stream_wrapper\StreamWrapper\HttpStreamWrapper

Namespace

Drupal\Tests\remote_stream_wrapper\Unit

Code

public function testUri() {
  $wrapper = new HttpStreamWrapper();
  $uri = 'http://example.com/file.txt';
  $wrapper
    ->setUri($uri);
  $this
    ->assertEquals($uri, $wrapper
    ->getUri());
  $this
    ->assertEquals($uri, $wrapper
    ->getExternalUrl());
  $this
    ->assertEquals(FALSE, $wrapper
    ->realpath());
}