You are here

function StreamWrapperTest::testGetValidStreamScheme in SimpleTest 7

Test the scheme functions.

File

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

Class

StreamWrapperTest
Tests stream wrapper functions.

Code

function testGetValidStreamScheme() {
  $this
    ->assertEqual('foo', file_uri_scheme('foo://pork//chops'), t('Got the correct scheme from foo://asdf'));
  $this
    ->assertTrue(file_stream_wrapper_valid_scheme(file_uri_scheme('public://asdf')), t('Got a valid stream scheme from public://asdf'));
  $this
    ->assertFalse(file_stream_wrapper_valid_scheme(file_uri_scheme('foo://asdf')), t('Did not get a valid stream scheme from foo://asdf'));
}