You are here

public function ImageStyleCustomStreamWrappersTest::providerTestCustomStreamWrappers in Drupal 9

Same name and namespace in other branches
  1. 8 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,
    ],
  ];
}