function StreamWrapperTest::testGetValidStreamScheme

Test the scheme functions.

File

drupal/core/modules/system/lib/Drupal/system/Tests/File/StreamWrapperTest.php, line 93
Definition of Drupal\system\Tests\File\StreamWrapperTest.

Class

StreamWrapperTest
Tests stream wrapper functions.

Namespace

Drupal\system\Tests\File

Code

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