1 file.test StreamWrapperTest::testGetInstanceByScheme()

Test the file_stream_wrapper_get_instance_by_scheme() function.

File

core/modules/simpletest/tests/file.test, line 2866
This provides SimpleTests for the core file handling functionality. These include FileValidateTest and FileSaveTest.

Class

StreamWrapperTest
Tests stream wrapper functions.

Code

function testGetInstanceByScheme() {
  $instance = file_stream_wrapper_get_instance_by_scheme($this->scheme);
  $this->assertEqual($this->class_name, get_class($instance), 'Got correct class type for dummy scheme.');

  $instance = file_stream_wrapper_get_instance_by_scheme('public');
  $this->assertEqual('BackdropPublicStreamWrapper', get_class($instance), 'Got correct class type for public scheme.');
}