function CaseInsensitivePathTest::testPathsWithArguments
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php \Drupal\FunctionalTests\Routing\CaseInsensitivePathTest::testPathsWithArguments()
- 8.9.x core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php \Drupal\FunctionalTests\Routing\CaseInsensitivePathTest::testPathsWithArguments()
- 11.x core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php \Drupal\FunctionalTests\Routing\CaseInsensitivePathTest::testPathsWithArguments()
Tests paths with slugs.
File
-
core/
tests/ Drupal/ FunctionalTests/ Routing/ CaseInsensitivePathTest.php, line 106
Class
- CaseInsensitivePathTest
- Tests incoming path case insensitivity.
Namespace
Drupal\FunctionalTests\RoutingCode
public function testPathsWithArguments() : void {
$this->drupalGet('system-test/echo/foobarbaz');
$this->assertSession()
->statusCodeEquals(200);
$this->assertSession()
->pageTextMatches('/foobarbaz/');
$this->assertSession()
->pageTextNotMatches('/FooBarBaz/');
$this->drupalGet('system-test/echo/FooBarBaz');
$this->assertSession()
->statusCodeEquals(200);
$this->assertSession()
->pageTextMatches('/FooBarBaz/');
$this->assertSession()
->pageTextNotMatches('/foobarbaz/');
// Test utf-8 characters in the route path.
$this->drupalGet('/system-test/Ȅchȏ/meΦω/ABc123');
$this->assertSession()
->statusCodeEquals(200);
$this->assertSession()
->pageTextMatches('/ABc123/');
$this->drupalGet('/system-test/ȅchȎ/MEΦΩ/ABc123');
$this->assertSession()
->statusCodeEquals(200);
$this->assertSession()
->pageTextMatches('/ABc123/');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.