function PathEncodedTest::testGetEncoded
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php \Drupal\FunctionalTests\Routing\PathEncodedTest::testGetEncoded()
- 8.9.x core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php \Drupal\FunctionalTests\Routing\PathEncodedTest::testGetEncoded()
- 11.x core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php \Drupal\FunctionalTests\Routing\PathEncodedTest::testGetEncoded()
File
-
core/
tests/ Drupal/ FunctionalTests/ Routing/ PathEncodedTest.php, line 31
Class
- PathEncodedTest
- Tests URL generation and routing for route paths with encoded characters.
Namespace
Drupal\FunctionalTests\RoutingCode
public function testGetEncoded() : void {
$route_paths = [
'path_encoded_test.colon' => '/hi/llama:party',
'path_encoded_test.at_sign' => '/blog/@Dries',
'path_encoded_test.parentheses' => '/cat(box)',
];
foreach ($route_paths as $route_name => $path) {
$this->drupalGet(Url::fromRoute($route_name));
$this->assertSession()
->pageTextContains('PathEncodedTestController works');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.