public function LinkGeneratorTest::providerTestGenerateHrefs in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 92 - Contains \Drupal\Tests\Core\Utility\LinkGeneratorTest.
Class
- LinkGeneratorTest
- @coversDefaultClass \Drupal\Core\Utility\LinkGenerator @group Utility
Namespace
Drupal\Tests\Core\UtilityCode
public function providerTestGenerateHrefs() {
return array(
// Test that the url returned by the URL generator is used.
array(
'test_route_1',
array(),
FALSE,
'/test-route-1',
),
// Test that $parameters is passed to the URL generator.
array(
'test_route_2',
array(
'value' => 'example',
),
FALSE,
'/test-route-2/example',
),
// Test that the 'absolute' option is passed to the URL generator.
array(
'test_route_3',
array(),
TRUE,
'http://example.com/test-route-3',
),
);
}