public function UrlGeneratorTest::providerTestNoPath in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php \Drupal\Tests\Core\Routing\UrlGeneratorTest::providerTestNoPath()
Data provider for ::testNoPath().
File
- core/
tests/ Drupal/ Tests/ Core/ Routing/ UrlGeneratorTest.php, line 491
Class
- UrlGeneratorTest
- Confirm that the UrlGenerator is functioning properly.
Namespace
Drupal\Tests\Core\RoutingCode
public function providerTestNoPath() {
return [
// Empty options.
[
[],
'',
],
// Query parameters only.
[
[
'query' => [
'foo' => 'bar',
],
],
'?foo=bar',
],
// Multiple query parameters.
[
[
'query' => [
'foo' => 'bar',
'baz' => '',
],
],
'?foo=bar&baz=',
],
// Fragment only.
[
[
'fragment' => 'foo',
],
'#foo',
],
// Query parameters and fragment.
[
[
'query' => [
'bar' => 'baz',
],
'fragment' => 'foo',
],
'?bar=baz#foo',
],
// Multiple query parameters and fragment.
[
[
'query' => [
'bar' => 'baz',
'foo' => 'bar',
],
'fragment' => 'foo',
],
'?bar=baz&foo=bar#foo',
],
];
}