simpletest.api.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * @file
  4. * Hooks provided by the SimpleTest module.
  5. */
  6. /**
  7. * @addtogroup hooks
  8. * @{
  9. */
  10. /**
  11. * Alter the list of tests.
  12. *
  13. * This hook will not be invoked by the phpunit tool.
  14. *
  15. * @param $groups
  16. * A two dimensional array, the first key is the test group, the second is the
  17. * name of the test class, and the value is in associative array containing
  18. * 'name', 'description', 'group', and 'requires' keys.
  19. *
  20. * @deprecated in drupal:8.6.0 and is removed from drupal:9.0.0. Convert
  21. * your test to a PHPUnit-based one and implement test listeners.
  22. *
  23. * @see https://www.drupal.org/node/2939892
  24. */
  25. function hook_simpletest_alter(&$groups) {
  26. // An alternative session handler module would not want to run the original
  27. // Session HTTPS handling test because it checks the sessions table in the
  28. // database.
  29. unset($groups['Session']['testHttpsSession']);
  30. }
  31. /**
  32. * A test group has started.
  33. *
  34. * This hook is called just once at the beginning of a test group.
  35. *
  36. * This hook is only invoked by the Simpletest UI form runner. It will not be
  37. * invoked by run-tests.sh or the phpunit tool.
  38. *
  39. * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Convert your
  40. * test to a PHPUnit-based one and implement test listeners.
  41. *
  42. * @see https://www.drupal.org/node/2934242
  43. */
  44. function hook_test_group_started() {
  45. }
  46. /**
  47. * A test group has finished.
  48. *
  49. * This hook is called just once at the end of a test group.
  50. *
  51. * This hook is only invoked by the Simpletest UI form runner. It will not be
  52. * invoked by run-tests.sh or the phpunit tool.
  53. *
  54. * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Convert your
  55. * test to a PHPUnit-based one and implement test listeners.
  56. *
  57. * @see https://www.drupal.org/node/2934242
  58. */
  59. function hook_test_group_finished() {
  60. }
  61. /**
  62. * An individual test has finished.
  63. *
  64. * This hook is called when an individual test has finished.
  65. *
  66. * This hook is only invoked by the Simpletest UI form runner. It will not be
  67. * invoked by run-tests.sh or the phpunit tool.
  68. *
  69. * @param
  70. * $results The results of the test as gathered by
  71. * \Drupal\simpletest\WebTestBase.
  72. *
  73. * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Convert your
  74. * test to a PHPUnit-based one and implement test listeners.
  75. *
  76. * @see https://www.drupal.org/node/2934242
  77. * @see _simpletest_batch_operation()
  78. */
  79. function hook_test_finished($results) {
  80. }
  81. /**
  82. * @} End of "addtogroup hooks".
  83. */