function FileTestBase::register

Same name in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/Core/File/FileTestBase.php \Drupal\KernelTests\Core\File\FileTestBase::register()
  2. 10 core/tests/Drupal/KernelTests/Core/File/FileTestBase.php \Drupal\KernelTests\Core\File\FileTestBase::register()
  3. 11.x core/tests/Drupal/KernelTests/Core/File/FileTestBase.php \Drupal\KernelTests\Core\File\FileTestBase::register()

Overrides KernelTestBase::register

File

core/tests/Drupal/KernelTests/Core/File/FileTestBase.php, line 50

Class

FileTestBase
Provides file-specific assertions and helper functions.

Namespace

Drupal\KernelTests\Core\File

Code

public function register(ContainerBuilder $container) {
    parent::register($container);
    $container->register('stream_wrapper.private', 'Drupal\\Core\\StreamWrapper\\PrivateStream')
        ->addTag('stream_wrapper', [
        'scheme' => 'private',
    ]);
    if (isset($this->scheme)) {
        $container->register('stream_wrapper.' . $this->scheme, $this->classname)
            ->addTag('stream_wrapper', [
            'scheme' => $this->scheme,
        ]);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.