function HttpKernelUiHelperTrait::getUrl

Gets the current URL from the browser.

See also

\Drupal\Tests\UiHelperTrait::getUrl

File

core/tests/Drupal/Tests/HttpKernelUiHelperTrait.php, line 251

Class

HttpKernelUiHelperTrait
Provides UI helper methods using the HTTP kernel to make requests.

Namespace

Drupal\Tests

Code

protected function getUrl() : string {
  return $this->getSession()
    ->getCurrentUrl();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.