function UrlHelperTest::dataEnhanceWithPrefix
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::dataEnhanceWithPrefix()
- 8.9.x core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::dataEnhanceWithPrefix()
- 11.x core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::dataEnhanceWithPrefix()
Enhances test URLs with prefixes.
Parameters
array $urls: The list of URLs.
Return value
array A list of provider data with prefixes.
2 calls to UrlHelperTest::dataEnhanceWithPrefix()
- UrlHelperTest::providerTestInvalidRelativeData in core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php - Provides data for testInvalidRelative().
- UrlHelperTest::providerTestValidRelativeData in core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php - Provides data for testValidRelative().
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php, line 576
Class
- UrlHelperTest
- @group Utility
Namespace
Drupal\Tests\Component\UtilityCode
protected static function dataEnhanceWithPrefix(array $urls) : array {
$prefixes = [
'',
'/',
];
$data = [];
foreach ($prefixes as $prefix) {
foreach ($urls as $url) {
$data[] = [
$url,
$prefix,
];
}
}
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.