function 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\Routing

Code

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.