You are here

public function VendorStreamWrapperServiceTest::testCreatUrlFromUri in Vendor Stream Wrapper 8

Tests a path output from createFromUri().

@covers::creatUrlFromUri

File

tests/src/Kernel/VendorStreamWrapperServiceTest.php, line 26

Class

VendorStreamWrapperServiceTest
@coversDefaultClass \Drupal\vendor_stream_wrapper\Service\VendorStreamWrapperService

Namespace

Drupal\Tests\vendor_stream_wrapper\Kernel

Code

public function testCreatUrlFromUri() {
  $service = $this->container
    ->get('vendor_stream_wrapper.service');
  $path = $service
    ->creatUrlFromUri('vendor://aceme/anvil/heavy.png');
  $this
    ->assertEquals('/vendor_files/aceme/anvil/heavy.png', $path);
}