First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,30 @@
<?php
namespace Civi\Test;
/**
* Interface HookInterface
* @package Civi\Test
*
* This interface allows you to subscribe to hooks as part of the test.
* Simply create an eponymous hook function (e.g. `hook_civicrm_post()`).
*
* @code
* class MyTest extends \PHPUnit_Framework_TestCase implements \Civi\Test\HookInterface {
* public function hook_civicrm_post($op, $objectName, $objectId, &$objectRef) {
* echo "Running hook_civicrm_post\n";
* }
* }
* @endCode
*
* At time of writing, there are a few limitations in how HookInterface is handled
* by CiviTestListener:
*
* - The test must execute in-process (aka HeadlessInterface; aka CIVICRM_UF==UnitTests).
* End-to-end tests (multi-process tests) are not supported.
* - Early bootstrap hooks (e.g. hook_civicrm_config) are not supported.
*
* @see CiviTestListener
*/
interface HookInterface {
}