protected function UrlHelperTest::dataEnhanceWithScheme in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::dataEnhanceWithScheme()
Enhances test urls with schemes.
Parameters
array $urls: The list of urls.
Return value
array A list of provider data with schemes.
2 calls to UrlHelperTest::dataEnhanceWithScheme()
- UrlHelperTest::providerTestInvalidAbsolute in core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php - Provides data for testInvalidAbsolute().
- UrlHelperTest::providerTestValidAbsoluteData in core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php - Data provider for testValidAbsolute().
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php, line 523
Class
- UrlHelperTest
- @group Utility
Namespace
Drupal\Tests\Component\UtilityCode
protected function dataEnhanceWithScheme(array $urls) {
$url_schemes = [
'http',
'https',
'ftp',
];
$data = [];
foreach ($url_schemes as $scheme) {
foreach ($urls as $url) {
$data[] = [
$url,
$scheme,
];
}
}
return $data;
}