StreamWrapperTest::testGetValidStreamScheme

  1. drupal
    1. 8
    2. 7
Versions
7 StreamWrapperTest::testGetValidStreamScheme()

Test the scheme functions.

Code

modules/simpletest/tests/file.test, line 2743

<?php
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'));
}
?>