function ImageStyleCustomStreamWrappersTest::providerTestCustomStreamWrappers

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

Provide test cases for testCustomStreamWrappers().

Derivatives created from writable source stream wrappers will inherit the scheme from source. Derivatives created from read-only stream wrappers will fall-back to the default scheme.

Return value

array[] An array having each element an array with three items:

  • The source stream wrapper scheme.
  • The derivative expected stream wrapper scheme.
  • The stream wrapper service class.
1 call to ImageStyleCustomStreamWrappersTest::providerTestCustomStreamWrappers()
ImageStyleCustomStreamWrappersTest::register in core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php
Registers test-specific services.

File

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

Class

ImageStyleCustomStreamWrappersTest
Tests derivative generation with source images using stream wrappers.

Namespace

Drupal\Tests\image\Kernel

Code

public function providerTestCustomStreamWrappers() {
    return [
        [
            'public',
            'public',
            PublicStream::class,
        ],
        [
            'private',
            'private',
            PrivateStream::class,
        ],
        [
            'dummy',
            'dummy',
            DummyStreamWrapper::class,
        ],
        [
            'dummy-readonly',
            'public',
            DummyReadOnlyStreamWrapper::class,
        ],
        [
            'dummy-remote-readonly',
            'public',
            DummyRemoteReadOnlyStreamWrapper::class,
        ],
    ];
}

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