function HttpKernelUiHelperTrait::assertSession
Same name and namespace in other branches
- main core/tests/Drupal/Tests/HttpKernelUiHelperTrait.php \Drupal\Tests\HttpKernelUiHelperTrait::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.
7 calls to HttpKernelUiHelperTrait::assertSession()
- ElementsContainerTest::testOptionalContainerElements in core/
modules/ system/ tests/ src/ Kernel/ Form/ ElementsContainerTest.php - Tests the #optional container property.
- HelpTopicTest::testHelp in core/
modules/ help/ tests/ src/ Kernel/ HelpTopicTest.php - Tests the main help page and individual pages for topics.
- HelpTopicTest::testHelpLinks in core/
modules/ help/ tests/ src/ Kernel/ HelpTopicTest.php - Verifies links on various topic pages.
- HelpTopicTest::verifyHelp in core/
modules/ help/ tests/ src/ Kernel/ HelpTopicTest.php - Verifies the logged in user has access to various help links and pages.
- HttpResponseDebugCacheabilityHeadersTest::testCacheDebugHeadersLineLength in core/
tests/ Drupal/ KernelTests/ Core/ EventSubscriber/ HttpResponseDebugCacheabilityHeadersTest.php - Tests that cache debug headers do not error from exceeding line limits.
File
-
core/
tests/ Drupal/ Tests/ HttpKernelUiHelperTrait.php, line 222
Class
- HttpKernelUiHelperTrait
- Provides UI helper methods using the HTTP kernel to make requests.
Namespace
Drupal\TestsCode
public function assertSession($name = NULL) : WebAssert {
$this->addToAssertionCount(1);
return new WebAssert($this->getSession($name));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.