function UiHelperTrait::assertSession
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::assertSession()
- 10 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::assertSession()
- 8.9.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.
49 calls to UiHelperTrait::assertSession()
- BooleanFormatterSettingsTest::testBooleanFormatterSettings in core/
modules/ field/ tests/ src/ Functional/ Boolean/ BooleanFormatterSettingsTest.php - Tests the formatter settings page for the Boolean formatter.
- ConfigurableLanguageManagerTest::testUrlContentTranslationWithPreferredAdminLanguage in core/
modules/ language/ tests/ src/ Functional/ ConfigurableLanguageManagerTest.php - Tests translation with URL and Preferred Admin Language negotiators.
- ConfigurableLanguageManagerTest::testUrlContentTranslationWithSessionLanguage in core/
modules/ language/ tests/ src/ Functional/ ConfigurableLanguageManagerTest.php - Tests translation with URL and Session Language Negotiators.
- ConfigurableLanguageManagerTest::testUserProfileTranslationWithPreferredAdminLanguage in core/
modules/ language/ tests/ src/ Functional/ ConfigurableLanguageManagerTest.php - Tests translation of the user profile edit form.
- DbLogTest::test403LogEventPage in core/
modules/ dblog/ tests/ src/ Functional/ DbLogTest.php - Tests that a 403 event is logged with the exception triggering it.
File
-
core/
tests/ Drupal/ Tests/ UiHelperTrait.php, line 297
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.