simpletest.api.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.x and will be removed before 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. function hook_test_group_started() {
  37. }
  38. /**
  39. * A test group has finished.
  40. *
  41. * This hook is called just once at the end of a test group.
  42. */
  43. function hook_test_group_finished() {
  44. }
  45. /**
  46. * An individual test has finished.
  47. *
  48. * This hook is called when an individual test has finished.
  49. *
  50. * @param
  51. * $results The results of the test as gathered by
  52. * \Drupal\simpletest\WebTestBase.
  53. *
  54. * @see \Drupal\simpletest\WebTestBase::results()
  55. */
  56. function hook_test_finished($results) {
  57. }
  58. /**
  59. * @} End of "addtogroup hooks".
  60. */