You are here

protected function MenuRouterTest::doTestExoticPath in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::doTestExoticPath()

Tests path containing "exotic" characters.

1 call to MenuRouterTest::doTestExoticPath()
MenuRouterTest::testMenuIntegration in core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php
Tests menu integration.

File

core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php, line 192

Class

MenuRouterTest
Tests menu router and default menu link functionality.

Namespace

Drupal\Tests\system\Functional\Menu

Code

protected function doTestExoticPath() {

  // "Special" ASCII characters.
  $path = "menu-test/ -._~!\$'\"()*@[]?&+%#,;=:" . "%23%25%26%2B%2F%3F" . "éøïвβ中國書۞";
  $this
    ->drupalGet($path);
  $this
    ->assertSession()
    ->pageTextContains('This is the menuTestCallback content.');
  $this
    ->assertSession()
    ->pageTextNotContains('The website encountered an unexpected error. Please try again later.');
}