function UrlHelperTest::dataEnhanceWithScheme
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::dataEnhanceWithScheme()
- 10 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::dataEnhanceWithScheme()
- 11.x 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 528
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.