You are here

public function AssertLegacyTraitTest::assertSession in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php \Drupal\Tests\Core\Assert\AssertLegacyTraitTest::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.

Overrides AssertLegacyTrait::assertSession

File

core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php, line 327

Class

AssertLegacyTraitTest
@coversDefaultClass \Drupal\FunctionalTests\AssertLegacyTrait @group Assert @group legacy

Namespace

Drupal\Tests\Core\Assert

Code

public function assertSession($name = NULL) {
  return $this->webAssert
    ->reveal();
}