WebDriverWebAssert.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace Drupal\FunctionalJavascriptTests;
  3. /**
  4. * Defines a JSWebAssert with no support for status code and header assertions.
  5. */
  6. class WebDriverWebAssert extends JSWebAssert {
  7. /**
  8. * The use of statusCodeEquals() is not available.
  9. *
  10. * @param int $code
  11. * The status code.
  12. */
  13. public function statusCodeEquals($code) {
  14. @trigger_error('Support for statusCodeEquals is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
  15. parent::statusCodeEquals($code);
  16. }
  17. /**
  18. * The use of statusCodeNotEquals() is not available.
  19. *
  20. * @param int $code
  21. * The status code.
  22. */
  23. public function statusCodeNotEquals($code) {
  24. @trigger_error('Support for statusCodeNotEquals is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
  25. parent::statusCodeNotEquals($code);
  26. }
  27. /**
  28. * The use of responseHeaderEquals() is not available.
  29. *
  30. * @param string $name
  31. * The name of the header.
  32. * @param string $value
  33. * The value to check the header against.
  34. */
  35. public function responseHeaderEquals($name, $value) {
  36. @trigger_error('Support for responseHeaderEquals is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
  37. parent::responseHeaderEquals($name, $value);
  38. }
  39. /**
  40. * The use of responseHeaderNotEquals() is not available.
  41. *
  42. * @param string $name
  43. * The name of the header.
  44. * @param string $value
  45. * The value to check the header against.
  46. */
  47. public function responseHeaderNotEquals($name, $value) {
  48. @trigger_error('Support for responseHeaderNotEquals is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
  49. parent::responseHeaderNotEquals($name, $value);
  50. }
  51. }