You are here

public function StreamWrapperTest::testGetClassName in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::testGetClassName()
  2. 10 core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php \Drupal\KernelTests\Core\File\StreamWrapperTest::testGetClassName()

Test the getClassName() function.

File

core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php, line 51

Class

StreamWrapperTest
Tests stream wrapper functions.

Namespace

Drupal\KernelTests\Core\File

Code

public function testGetClassName() {

  // Check the dummy scheme.
  $this
    ->assertEqual($this->classname, \Drupal::service('stream_wrapper_manager')
    ->getClass($this->scheme), 'Got correct class name for dummy scheme.');

  // Check core's scheme.
  $this
    ->assertEqual('Drupal\\Core\\StreamWrapper\\PublicStream', \Drupal::service('stream_wrapper_manager')
    ->getClass('public'), 'Got correct class name for public scheme.');
}