You are here

function StreamWrapperTest::testGetInstanceByScheme in Drupal 7

Test the file_stream_wrapper_get_instance_by_scheme() function.

File

modules/simpletest/tests/file.test, line 2940
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->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.');
}