function StreamWrapperTest::testGetInstanceByScheme in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/File/StreamWrapperTest.php \Drupal\system\Tests\File\StreamWrapperTest::testGetInstanceByScheme()
Test the getViaScheme() method.
File
- core/
modules/ system/ src/ Tests/ File/ StreamWrapperTest.php, line 67 - Contains \Drupal\system\Tests\File\StreamWrapperTest.
Class
- StreamWrapperTest
- Tests stream wrapper functions.
Namespace
Drupal\system\Tests\FileCode
function testGetInstanceByScheme() {
$instance = \Drupal::service('stream_wrapper_manager')
->getViaScheme($this->scheme);
$this
->assertEqual($this->classname, get_class($instance), 'Got correct class type for dummy scheme.');
$instance = \Drupal::service('stream_wrapper_manager')
->getViaScheme('public');
$this
->assertEqual('Drupal\\Core\\StreamWrapper\\PublicStream', get_class($instance), 'Got correct class type for public scheme.');
}