public function CaseInsensitivePathTest::testPathsWithArguments in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php \Drupal\FunctionalTests\Routing\CaseInsensitivePathTest::testPathsWithArguments()
- 10 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 102
Class
- CaseInsensitivePathTest
- Tests incoming path case insensitivity.
Namespace
Drupal\FunctionalTests\RoutingCode
public function testPathsWithArguments() {
$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/');
}