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