You are here

public function StreamWrapperTest::testGetClassName in Drupal 10

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

Tests the getClassName() function.

File

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

Class

StreamWrapperTest
Tests stream wrapper functions.

Namespace

Drupal\KernelTests\Core\File

Code

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