public function testGetClassName() { // Check the dummy scheme.
$this->
assertEquals($this->classname, \Drupal::
service('stream_wrapper_manager'
)->
getClass($this->scheme
), 'Got correct class name for dummy scheme.'
);
// Check core's scheme.
$this->
assertEquals('Drupal\Core\StreamWrapper\PublicStream', \Drupal::
service('stream_wrapper_manager'
)->
getClass('public'
), 'Got correct class name for public scheme.'
);
} /**
* Tests the getViaScheme() method.
*/
public function testGetInstanceByScheme() { $instance = \Drupal::
service('stream_wrapper_manager'
)->
getViaScheme($this->scheme
);
$this->
assertEquals($this->classname,
get_class($instance), 'Got correct class type for dummy scheme.'
);
$instance = \Drupal::
service('stream_wrapper_manager'
)->
getViaScheme('public'
);
$this->
assertEquals('Drupal\Core\StreamWrapper\PublicStream',
get_class($instance), 'Got correct class type for public scheme.'
);
} /**
* Tests the getViaUri() and getViaScheme() methods and target functions.
*/
public function testUriFunctions() { $config =
$this->
config('system.file'
);