CRM-17860 - Civi\Test - Add mixins for Headless, Hook, Transaction, and EndToEnd...
authorTim Otten <totten@civicrm.org>
Tue, 9 Feb 2016 02:58:22 +0000 (18:58 -0800)
committerTim Otten <totten@civicrm.org>
Mon, 15 Feb 2016 22:23:50 +0000 (14:23 -0800)
commit09e1f1e3d33a64cf70d6a7f988d4c8788f090f0c
treea49f68d3e0c8652b2c4113a603670bd352f216c4
parentdb47db96f4f4d28a95238ebfb0294f583c117d5d
CRM-17860 - Civi\Test - Add mixins for Headless, Hook, Transaction, and EndToEnd functionality.

To describe the environment in which you want to run a test, add an
interface to the test class, e.g.

 * `HeadlessInterface` (along with optional `HookInterface` and `TransactionalInterface`)
 * `EndToEndInterface`

This is an alternative to other approaches like:

 * Extending a gigantic base-class (CiviUnitTestCase, CiviSeleniumTestCase)
 * Copy/paste a bunch of boiler-plate into your own class.
Civi/Test/CiviTestListener.php [new file with mode: 0644]
Civi/Test/EndToEndInterface.php [new file with mode: 0644]
Civi/Test/HeadlessInterface.php [new file with mode: 0644]
Civi/Test/HookInterface.php [new file with mode: 0644]
Civi/Test/TransactionalInterface.php [new file with mode: 0644]
phpunit.xml.dist
tests/phpunit/Civi/Test/ExampleHookTest.php [new file with mode: 0644]
tests/phpunit/Civi/Test/ExampleTransactionalTest.php [new file with mode: 0644]