function UiHelperTrait::getUrl

Same name in other branches
  1. 9 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::getUrl()
  2. 8.9.x core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::getUrl()
  3. 10 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::getUrl()

Get the current URL from the browser.

Return value

string The current URL.

59 calls to UiHelperTrait::getUrl()
BlockFormMessagesTest::testValidationMessage in core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php
Tests that validation messages are shown on the block form.
BooleanFieldTest::testBooleanField in core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php
Tests boolean field.
BooleanFieldTest::testFormAccess in core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php
Tests field access.
BrowserTestBase::getSessionCookies in core/tests/Drupal/Tests/BrowserTestBase.php
Get session cookies from current session.
CommentNonNodeTest::postComment in core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
Posts a comment.

... See full list

File

core/tests/Drupal/Tests/UiHelperTrait.php, line 471

Class

UiHelperTrait
Provides UI helper methods.

Namespace

Drupal\Tests

Code

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

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