function UpcastingTest::testNonAsciiConfigEntityRoute
Tests that non-ASCII config entity IDs in routes return 404.
Config entity routes get regex requirements derived from their schema constraints (e.g. machine_name pattern). Non-ASCII characters do not match these patterns, so the router rejects them with a 404.
File
-
core/
modules/ system/ tests/ src/ Functional/ ParamConverter/ UpcastingTest.php, line 105
Class
- UpcastingTest
- Tests upcasting of URL arguments to entities.
Namespace
Drupal\Tests\system\Functional\ParamConverterCode
public function testNonAsciiConfigEntityRoute() : void {
// No login needed: the router rejects the URL before access checking.
$this->drupalGet('node/add/öüä');
$this->assertSession()
->statusCodeEquals(404);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.