You are here

public function FileUrlGeneratorTest::testGenerateStringMissingStreamWrapper in Drupal 10

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php \Drupal\KernelTests\Core\File\FileUrlGeneratorTest::testGenerateStringMissingStreamWrapper()

Tests missing stream handler.

@covers ::generateString

File

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

Class

FileUrlGeneratorTest
@coversDefaultClass \Drupal\Core\File\FileUrlGenerator

Namespace

Drupal\KernelTests\Core\File

Code

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