public function FileUrlGeneratorTest::providerGenerateURI in Drupal 10
Same name and namespace in other branches
- 9 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\FileCode
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',
],
'external stream wrapper' => [
'dummy-external-readonly://core/assets/vendor/jquery/jquery.min.js',
'https://www.dummy-external-readonly.com/core/assets/vendor/jquery/jquery.min.js',
],
'external stream wrapper with query string' => [
'dummy-external-readonly://core/assets/vendor/jquery/jquery.min.js?foo=bar',
'https://www.dummy-external-readonly.com/core/assets/vendor/jquery/jquery.min.js?foo=bar',
],
'external stream wrapper with hashes' => [
'dummy-external-readonly://core/assets/vendor/jquery/jquery.min.js#whizz',
'https://www.dummy-external-readonly.com/core/assets/vendor/jquery/jquery.min.js#whizz',
],
'external stream wrapper with query string and hashes' => [
'dummy-external-readonly://core/assets/vendor/jquery/jquery.min.js?foo=bar#whizz',
'https://www.dummy-external-readonly.com/core/assets/vendor/jquery/jquery.min.js?foo=bar#whizz',
],
];
}