6 * Interface HeadlessInterface
9 * To run your test against a fake, headless database, flag it with the
10 * HeadlessInterface. CiviTestListener will automatically boot Civi.
12 * Alternatively, if you wish to run a test in a live (CMS-enabled) environment,
13 * flag it with EndToEndInterface.
15 * You may mix-in additional features for headless tests:
16 * - HookInterface: Auto-register any functions named "hook_civicrm_foo()".
17 * - TransactionalInterface: Wrap all work in a transaction, and rollback at the end.
19 * @see EndToEndInterface
21 * @see TransactionalInterface
23 interface HeadlessInterface
{
26 * The setupHeadless function runs at the start of each test case, right before
27 * the headless environment reboots.
29 * It should perform any necessary steps required for putting the database
30 * in a consistent baseline -- such as loading schema and extensions.
32 * The utility `\Civi\Test::headless()` provides a number of helper functions
33 * for managing this setup, and it includes optimizations to avoid redundant
38 public function setUpHeadless();