function ImageStyleCustomStreamWrappersTest::register

Same name in other branches
  1. 9 core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php \Drupal\Tests\image\Kernel\ImageStyleCustomStreamWrappersTest::register()
  2. 8.9.x core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php \Drupal\Tests\image\Kernel\ImageStyleCustomStreamWrappersTest::register()
  3. 11.x core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php \Drupal\Tests\image\Kernel\ImageStyleCustomStreamWrappersTest::register()

Overrides KernelTestBase::register

File

core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php, line 60

Class

ImageStyleCustomStreamWrappersTest
Tests derivative generation with source images using stream wrappers.

Namespace

Drupal\Tests\image\Kernel

Code

public function register(ContainerBuilder $container) {
    parent::register($container);
    foreach ($this->providerTestCustomStreamWrappers() as $stream_wrapper) {
        $scheme = $stream_wrapper[0];
        $class = $stream_wrapper[2];
        $container->register("stream_wrapper.{$scheme}", $class)
            ->addTag('stream_wrapper', [
            'scheme' => $scheme,
        ]);
    }
}

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