function StreamWrapperTest::testGetInstanceByScheme
Same name in other branches
- 7.x modules/simpletest/tests/file.test \StreamWrapperTest::testGetInstanceByScheme()
- 9 core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::testGetInstanceByScheme()
- 8.9.x core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::testGetInstanceByScheme()
- 10 core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::testGetInstanceByScheme()
Tests the getViaScheme() method.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ File/ StreamWrapperTest.php, line 65
Class
- StreamWrapperTest
- Tests stream wrapper functions.
Namespace
Drupal\KernelTests\Core\FileCode
public function testGetInstanceByScheme() : void {
$instance = \Drupal::service('stream_wrapper_manager')->getViaScheme($this->scheme);
$this->assertEquals($this->classname, get_class($instance), 'Got correct class type for dummy scheme.');
$instance = \Drupal::service('stream_wrapper_manager')->getViaScheme('public');
$this->assertEquals('Drupal\\Core\\StreamWrapper\\PublicStream', get_class($instance), 'Got correct class type for public scheme.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.