function FileUrlGeneratorTest::testGenerateAbsoluteStringMissingStreamWrapper

Same name and namespace in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php \Drupal\KernelTests\Core\File\FileUrlGeneratorTest::testGenerateAbsoluteStringMissingStreamWrapper()
  2. 11.x core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php \Drupal\KernelTests\Core\File\FileUrlGeneratorTest::testGenerateAbsoluteStringMissingStreamWrapper()

Tests missing stream handler.

@covers ::generateAbsoluteString

File

core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php, line 60

Class

FileUrlGeneratorTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21File%21FileUrlGenerator.php/class/FileUrlGenerator/9" title="Default implementation for the file URL generator service." class="local">\Drupal\Core\File\FileUrlGenerator</a>

Namespace

Drupal\KernelTests\Core\File

Code

public function testGenerateAbsoluteStringMissingStreamWrapper() {
    $this->expectException(InvalidStreamWrapperException::class);
    $result = $this->fileUrlGenerator
        ->generateAbsoluteString("foo://bar");
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.