Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
CDNTaxReceipts
Commits
5c54cc8b
Commit
5c54cc8b
authored
Sep 22, 2021
by
DaveD
Browse files
Fix install/uninstall
parent
df04113d
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/phpunit/CRM/Cdntaxreceipts/HookTest.php
View file @
5c54cc8b
<?php
use
Civi\Test\HeadlessInterface
;
/**
* Tips:
* - With HookInterface, you may implement CiviCRM hooks directly in the test class.
* Simply create corresponding functions (e.g. "hook_civicrm_post(...)" or similar).
* - With TransactionalInterface, any data changes made by setUp() or test****() functions will
* rollback automatically -- as long as you don't manipulate schema or truncate tables.
* If this test needs to manipulate schema or truncate tables, then either:
* a. Do all that using setupHeadless() and Civi\Test.
* b. Disable TransactionalInterface, and handle all setup/teardown yourself.
*
* @group headless
*/
class
CRM_Cdntaxreceipts_HookTest
extends
\
CiviUnitTestCase
implements
HeadlessInterface
{
public
function
setUpHeadless
()
{
// Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile().
// See: https://docs.civicrm.org/dev/en/latest/testing/phpunit/#civitest
return
\
Civi\Test
::
headless
()
->
installMe
(
__DIR__
)
->
apply
();
}
class
CRM_Cdntaxreceipts_HookTest
extends
CRM_Cdntaxreceipts_Base
{
/**
* Test eligibleAmount
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment