6 * Interface HookInterface
9 * This interface allows you to subscribe to hooks as part of the test.
10 * Simply create an eponymous hook function (e.g. `hook_civicrm_post()`).
13 * class MyTest extends \PHPUnit_Framework_TestCase implements \Civi\Test\HookInterface {
14 * public function hook_civicrm_post($op, $objectName, $objectId, &$objectRef) {
15 * echo "Running hook_civicrm_post\n";
20 * At time of writing, there are a few limitations in how HookInterface is handled
21 * by CiviTestListener:
23 * - The test must execute in-process (aka HeadlessInterface; aka CIVICRM_UF==UnitTests).
24 * End-to-end tests (multi-process tests) are not supported.
25 * - Early bootstrap hooks (e.g. hook_civicrm_config) are not supported.
27 * @see CiviTestListener
29 interface HookInterface
{