function LinkGeneratorTest::providerTestGenerateHrefs
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php \Drupal\Tests\Core\Utility\LinkGeneratorTest::providerTestGenerateHrefs()
- 10 core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php \Drupal\Tests\Core\Utility\LinkGeneratorTest::providerTestGenerateHrefs()
- 11.x core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php \Drupal\Tests\Core\Utility\LinkGeneratorTest::providerTestGenerateHrefs()
Provides test data for testing the link method.
Return value
array Returns some test data.
See also
\Drupal\Tests\Core\Utility\LinkGeneratorTest::testGenerateHrefs()
File
-
core/
tests/ Drupal/ Tests/ Core/ Utility/ LinkGeneratorTest.php, line 91
Class
- LinkGeneratorTest
- @coversDefaultClass \Drupal\Core\Utility\LinkGenerator @group Utility
Namespace
Drupal\Tests\Core\UtilityCode
public function providerTestGenerateHrefs() {
return [
// Test that the URL returned by the URL generator is used.
[
'test_route_1',
[],
FALSE,
'/test-route-1',
],
// Test that $parameters is passed to the URL generator.
[
'test_route_2',
[
'value' => 'example',
],
FALSE,
'/test-route-2/example',
],
// Test that the 'absolute' option is passed to the URL generator.
[
'test_route_3',
[],
TRUE,
'http://example.com/test-route-3',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.