function StreamWrapperTest::testGetInstanceByScheme

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::testGetInstanceByScheme()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::testGetInstanceByScheme()
  3. 10 core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::testGetInstanceByScheme()
  4. 11.x core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::testGetInstanceByScheme()

Test the file_stream_wrapper_get_instance_by_scheme() function.

File

modules/simpletest/tests/file.test, line 2989

Class

StreamWrapperTest
Tests stream wrapper functions.

Code

function testGetInstanceByScheme() {
    $instance = file_stream_wrapper_get_instance_by_scheme($this->scheme);
    $this->assertEqual($this->classname, get_class($instance), 'Got correct class type for dummy scheme.');
    $instance = file_stream_wrapper_get_instance_by_scheme('public');
    $this->assertEqual('DrupalPublicStreamWrapper', 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.