function ExtensionStreamTest::providerStreamWrapperMethodsOnMissingExtensions

Test cases for testing stream wrapper methods on missing extensions.

Return value

array[] A list of test cases. Each case consists of the following items:

  • The URI to be tested.
  • The expected exception message.

File

core/tests/Drupal/KernelTests/Core/StreamWrapper/ExtensionStreamTest.php, line 205

Class

ExtensionStreamTest
Tests extension stream wrappers.

Namespace

Drupal\KernelTests\Core\StreamWrapper

Code

public static function providerStreamWrapperMethodsOnMissingExtensions() : array {
  return [
    // Cases for the module:// stream wrapper.
'Module is not installed' => [
      'module://field/field.info.yml',
      'The module field does not exist.',
    ],
    'Module does not exist' => [
      'module://foo_bar/foo.bar.js',
      'The module foo_bar does not exist.',
    ],
    'Theme is not installed' => [
      'theme://stark/screenshot.png',
      'The theme stark does not exist.',
    ],
    'Theme does not exist' => [
      'theme://foo/foo.info.yml',
      'The theme foo does not exist.',
    ],
    'Theme streamwrapper cannot access installed module' => [
      'theme://system/system.info.yml',
      'The theme system does not exist.',
    ],
    'Module stream wrapper cannot access installed theme' => [
      'module://claro/claro.info.yml',
      'The module claro does not exist.',
    ],
  ];
}

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