public function UrlGeneratorTest::providerTestNoPath in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 371 - Contains \Drupal\Tests\Core\Routing\UrlGeneratorTest.
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',
],
];
}