Pull merge.
[yaffs-website] / web / core / tests / Drupal / FunctionalJavascriptTests / JavascriptTestBase.php
1 <?php
2
3 namespace Drupal\FunctionalJavascriptTests;
4
5 @trigger_error('The ' . __NAMESPACE__ . '\JavascriptTestBase is deprecated in Drupal 8.5.x and will be removed before Drupal 9.0.0. Instead, use ' . __NAMESPACE__ . '\WebDriverTestBase. See https://www.drupal.org/node/2945059', E_USER_DEPRECATED);
6
7 use Zumba\Mink\Driver\PhantomJSDriver;
8
9 /**
10  * Runs a browser test using PhantomJS.
11  *
12  * Base class for testing browser interaction implemented in JavaScript.
13  *
14  * @deprecated in Drupal 8.6.x, will be removed before Drupal 9.0.0.
15  * Use \Drupal\FunctionalJavascriptTests\WebDriverTestBase instead
16  *
17  * @see https://www.drupal.org/node/2945059
18  */
19 abstract class JavascriptTestBase extends WebDriverTestBase {
20
21   /**
22    * {@inheritdoc}
23    */
24   protected $minkDefaultDriverClass = PhantomJSDriver::class;
25
26   /**
27    * {@inheritdoc}
28    */
29   public function assertSession($name = NULL) {
30     // Return a WebAssert that supports status code and header assertions.
31     return new JSWebAssert($this->getSession($name), $this->baseUrl);
32   }
33
34 }