function ExtensionStreamTest::testStreamWrapperGetExternalUrlOnMissingExtensions
Test the getExternalUrl 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 187
Class
- ExtensionStreamTest
- Tests extension stream wrappers.
Namespace
Drupal\KernelTests\Core\StreamWrapperCode
public function testStreamWrapperGetExternalUrlOnMissingExtensions(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]
->getExternalUrl();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.