public function JavascriptTestBase::assertSession in Drupal 8
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 WebDriverTestBase::assertSession
File
- core/
tests/ Drupal/ FunctionalJavascriptTests/ JavascriptTestBase.php, line 31
Class
- JavascriptTestBase
- Runs a browser test using PhantomJS.
Namespace
Drupal\FunctionalJavascriptTestsCode
public function assertSession($name = NULL) {
// Return a WebAssert that supports status code and header assertions.
return new JSWebAssert($this
->getSession($name), $this->baseUrl);
}