class JavascriptTestBase

Runs a browser test using PhantomJS.

Base class for testing browser interaction implemented in JavaScript.

Hierarchy

Expanded class hierarchy of JavascriptTestBase

Deprecated

in drupal:8.6.0 and is removed from drupal:9.0.0. Use \Drupal\FunctionalJavascriptTests\WebDriverTestBase instead

See also

https://www.drupal.org/node/2945059

Related topics

File

core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php, line 21

Namespace

Drupal\FunctionalJavascriptTests
View source
abstract class JavascriptTestBase extends WebDriverTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected $minkDefaultDriverClass = PhantomJSDriver::class;
  
  /**
   * {@inheritdoc}
   */
  public function assertSession($name = NULL) {
    // Return a WebAssert that supports status code and header assertions.
    return new JSWebAssert($this->getSession($name), $this->baseUrl);
  }

}

Members

Title Sort descending Modifiers Object type Summary
JavascriptTestBase::$minkDefaultDriverClass protected property
JavascriptTestBase::assertSession public function

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