function HttpKernelUiHelperTrait::getUrl

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/HttpKernelUiHelperTrait.php \Drupal\Tests\HttpKernelUiHelperTrait::getUrl()

Gets the current URL from the browser.

See also

\Drupal\Tests\UiHelperTrait::getUrl

File

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

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.