You are here

function StreamWrapperTest::testGetInstanceByScheme in SimpleTest 7

Test the file_stream_wrapper_get_instance_by_scheme() function.

File

tests/file.test, line 2158
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), t('Got correct class type for dummy scheme.'));
  $instance = file_stream_wrapper_get_instance_by_scheme('public');
  $this
    ->assertEqual('DrupalPublicStreamWrapper', get_class($instance), t('Got correct class type for public scheme.'));
}