You are here

public function FileUrlGeneratorTest::providerGenerateURI in Drupal 9

Same name and namespace in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php \Drupal\KernelTests\Core\File\FileUrlGeneratorTest::providerGenerateURI()

Data provider.

File

core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php, line 217

Class

FileUrlGeneratorTest
@coversDefaultClass \Drupal\Core\File\FileUrlGenerator

Namespace

Drupal\KernelTests\Core\File

Code

public function providerGenerateURI() {
  return [
    'schemaless' => [
      '//core/assets/vendor/jquery/jquery.min.js',
      '//core/assets/vendor/jquery/jquery.min.js',
    ],
    'query string' => [
      '//core/assets/vendor/jquery/jquery.min.js?foo',
      '//core/assets/vendor/jquery/jquery.min.js?foo',
    ],
    'query string and hashes' => [
      '//core/assets/vendor/jquery/jquery.min.js?foo=bar#whizz',
      '//core/assets/vendor/jquery/jquery.min.js?foo=bar#whizz',
    ],
    'hashes' => [
      '//core/assets/vendor/jquery/jquery.min.js#whizz',
      '//core/assets/vendor/jquery/jquery.min.js#whizz',
    ],
    'root-relative' => [
      '/core/assets/vendor/jquery/jquery.min.js',
      'base:/core/assets/vendor/jquery/jquery.min.js',
    ],
    'relative' => [
      'core/assets/vendor/jquery/jquery.min.js',
      'base:core/assets/vendor/jquery/jquery.min.js',
    ],
    'external' => [
      'https://www.example.com/core/assets/vendor/jquery/jquery.min.js',
      'https://www.example.com/core/assets/vendor/jquery/jquery.min.js',
    ],
  ];
}