function UrlAlterFunctionalTest::testCurrentUrlRequestedPath

Test current_path() and request_path().

File

drupal/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php, line 86
Definition of Drupal\system\Tests\Path\UrlAlterFunctionalTest.

Class

UrlAlterFunctionalTest
Tests hook_url_alter functions.

Namespace

Drupal\system\Tests\Path

Code

function testCurrentUrlRequestedPath() {
  $this
    ->drupalGet('url-alter-test/bar');
  $this
    ->assertRaw('request_path=url-alter-test/bar', 'request_path() returns the requested path.');
  $this
    ->assertRaw('current_path=url-alter-test/foo', 'current_path() returns the internal path.');
}