WebDriverWebAssert.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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.', E_USER_DEPRECATED);
  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.', E_USER_DEPRECATED);
  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.', E_USER_DEPRECATED);
  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.', E_USER_DEPRECATED);
  49. parent::responseHeaderNotEquals($name, $value);
  50. }
  51. /**
  52. * The use of responseHeaderContains() is not available.
  53. *
  54. * @param string $name
  55. * The name of the header.
  56. * @param string $value
  57. * The value to check the header against.
  58. */
  59. public function responseHeaderContains($name, $value) {
  60. @trigger_error('Support for responseHeaderContains is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.', E_USER_DEPRECATED);
  61. parent::responseHeaderContains($name, $value);
  62. }
  63. /**
  64. * The use of responseHeaderNotContains() is not available.
  65. *
  66. * @param string $name
  67. * The name of the header.
  68. * @param string $value
  69. * The value to check the header against.
  70. */
  71. public function responseHeaderNotContains($name, $value) {
  72. @trigger_error('Support for responseHeaderNotContains is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.', E_USER_DEPRECATED);
  73. parent::responseHeaderNotContains($name, $value);
  74. }
  75. /**
  76. * The use of responseHeaderMatches() is not available.
  77. *
  78. * @param string $name
  79. * The name of the header.
  80. * @param string $regex
  81. * The value to check the header against.
  82. */
  83. public function responseHeaderMatches($name, $regex) {
  84. @trigger_error('Support for responseHeaderMatches is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.', E_USER_DEPRECATED);
  85. parent::responseHeaderMatches($name, $regex);
  86. }
  87. /**
  88. * The use of responseHeaderNotMatches() is not available.
  89. *
  90. * @param string $name
  91. * The name of the header.
  92. * @param string $regex
  93. * The value to check the header against.
  94. */
  95. public function responseHeaderNotMatches($name, $regex) {
  96. @trigger_error('Support for responseHeaderNotMatches is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.', E_USER_DEPRECATED);
  97. parent::responseHeaderNotMatches($name, $regex);
  98. }
  99. }