Mercurial > hg > isophonics-drupal-site
annotate core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\FunctionalJavascriptTests; |
Chris@0 | 4 |
Chris@17 | 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); |
Chris@17 | 6 |
Chris@0 | 7 use Zumba\Mink\Driver\PhantomJSDriver; |
Chris@0 | 8 |
Chris@0 | 9 /** |
Chris@17 | 10 * Runs a browser test using PhantomJS. |
Chris@0 | 11 * |
Chris@0 | 12 * Base class for testing browser interaction implemented in JavaScript. |
Chris@17 | 13 * |
Chris@17 | 14 * @deprecated in Drupal 8.6.x, will be removed before Drupal 9.0.0. |
Chris@17 | 15 * Use \Drupal\FunctionalJavascriptTests\WebDriverTestBase instead |
Chris@17 | 16 * |
Chris@17 | 17 * @see https://www.drupal.org/node/2945059 |
Chris@18 | 18 * |
Chris@18 | 19 * @ingroup testing |
Chris@0 | 20 */ |
Chris@17 | 21 abstract class JavascriptTestBase extends WebDriverTestBase { |
Chris@0 | 22 |
Chris@0 | 23 /** |
Chris@0 | 24 * {@inheritdoc} |
Chris@0 | 25 */ |
Chris@0 | 26 protected $minkDefaultDriverClass = PhantomJSDriver::class; |
Chris@0 | 27 |
Chris@0 | 28 /** |
Chris@0 | 29 * {@inheritdoc} |
Chris@0 | 30 */ |
Chris@0 | 31 public function assertSession($name = NULL) { |
Chris@17 | 32 // Return a WebAssert that supports status code and header assertions. |
Chris@17 | 33 return new JSWebAssert($this->getSession($name), $this->baseUrl); |
Chris@14 | 34 } |
Chris@14 | 35 |
Chris@0 | 36 } |