function ExtensionStreamTest::testStreamWrapperRealpathOnMissingExtensions

Test the realpath method on uninstalled extensions.

Attributes

#[DataProvider('providerStreamWrapperMethodsOnMissingExtensions')]

Parameters

string $uri: The URI to be tested.

string $expected_message: The expected exception message.

File

core/tests/Drupal/KernelTests/Core/StreamWrapper/ExtensionStreamTest.php, line 169

Class

ExtensionStreamTest
Tests extension stream wrappers.

Namespace

Drupal\KernelTests\Core\StreamWrapper

Code

public function testStreamWrapperRealpathOnMissingExtensions(string $uri, string $expected_message) : void {
  [$scheme] = explode('://', $uri);
  $this->streamWrappers[$scheme]
    ->setUri($uri);
  $this->expectException(UnknownExtensionException::class);
  $this->expectExceptionMessage($expected_message);
  $this->streamWrappers[$scheme]
    ->realpath();
}

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