function BrowserTestBase::getSession

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::getSession()
  2. 11.x core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::getSession()

Returns Mink session.

Parameters

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

Return value

\Behat\Mink\Session The active Mink session object.

38 calls to BrowserTestBase::getSession()
AdminTest::testCompactMode in core/modules/system/tests/src/Functional/System/AdminTest.php
Tests compact mode.
BlockFilterTest::testBlockFilter in core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php
Tests block filter.
CKEditor5FragmentLinkTest::testFragmentLink in core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php
Tests if the fragment link to a textarea works with CKEditor 5 enabled.
ContentPreviewToggleTest::assertOrderInPage in core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php
Asserts that blocks in a given order in the page.
DestinationTest::testDestination in core/modules/system/tests/src/Functional/Routing/DestinationTest.php
Tests that $_GET/$_REQUEST['destination'] only contain internal URLs.

... See full list

File

core/tests/Drupal/Tests/BrowserTestBase.php, line 466

Class

BrowserTestBase
Provides a test case for functional Drupal tests.

Namespace

Drupal\Tests

Code

public function getSession($name = NULL) {
  return $this->mink
    ->getSession($name);
}

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