You are here

public function UiHelperTrait::assertSession in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::assertSession()
  2. 9 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::assertSession()

Returns WebAssert object.

Parameters

string $name: (optional) Name of the session. Defaults to the active session.

Return value

\Drupal\Tests\WebAssert A new web-assert option for asserting the presence of elements with.

562 calls to UiHelperTrait::assertSession()
AccessDeniedTest::testAccessDenied in core/modules/system/tests/src/Functional/System/AccessDeniedTest.php
AccessDeniedTest::testAccessDeniedCustomPageWithAccessDenied in core/modules/system/tests/src/Functional/System/AccessDeniedTest.php
Tests that an inaccessible custom 403 page falls back to the default.
AccessRoleTest::testAccessRole in core/modules/user/tests/src/Functional/Views/AccessRoleTest.php
Tests role access plugin.
AdminMetaTagTest::testMetaTag in core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php
Verify that the meta tag HTML is generated correctly.
AdminTest::testAdminPages in core/modules/system/tests/src/Functional/System/AdminTest.php
Tests output on administrative listing pages.

... See full list

1 method overrides UiHelperTrait::assertSession()
WebDriverTestBase::assertSession in core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
Returns WebAssert object.

File

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

Class

UiHelperTrait
Provides UI helper methods.

Namespace

Drupal\Tests

Code

public function assertSession($name = NULL) {
  $this
    ->addToAssertionCount(1);
  return new WebAssert($this
    ->getSession($name), $this->baseUrl);
}