function UiHelperTrait::assertSession
Same name in other branches
- 9 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::assertSession()
- 8.9.x core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::assertSession()
- 11.x 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.
230 calls to UiHelperTrait::assertSession()
- AddedStylesheetsTest::testCkeditorStylesheets in core/
modules/ ckeditor5/ tests/ src/ Functional/ AddedStylesheetsTest.php - Test the ckeditor5-stylesheets theme config.
- BlockUiTest::testBrokenBlockVisibility in core/
modules/ block/ tests/ src/ Functional/ BlockUiTest.php - Tests that users without permission are not able to view broken blocks.
- BooleanFormatterSettingsTest::testBooleanFormatterSettings in core/
modules/ field/ tests/ src/ Functional/ Boolean/ BooleanFormatterSettingsTest.php - Tests the formatter settings page for the Boolean formatter.
- BreadcrumbFrontCacheContextsTest::testBreadcrumbsFrontPageCache in core/
modules/ system/ tests/ src/ Functional/ Menu/ BreadcrumbFrontCacheContextsTest.php - Validate that breadcrumb markup get the right cache contexts.
- BrowserTestBaseUserAgentTest::testUserAgentValidation in core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseUserAgentTest.php - Tests validation of the User-Agent header we use to perform test requests.
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 228
Class
- UiHelperTrait
- Provides UI helper methods.
Namespace
Drupal\TestsCode
public function assertSession($name = NULL) {
$this->addToAssertionCount(1);
return new WebAssert($this->getSession($name), $this->baseUrl);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.