From 2965b878eb04fcdc9572a000d9eef2b3ad38d4ee Mon Sep 17 00:00:00 2001 From: Edsel Date: Wed, 22 Jun 2016 17:55:37 +0530 Subject: [PATCH] CRM-16189 Unit test for checkContributeSettings ---------------------------------------- * CRM-16189: Improve support for Accrual Method bookkeeping https://issues.civicrm.org/jira/browse/CRM-16189 --- .../CRM/Contribute/PseudoConstantTest.php | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tests/phpunit/CRM/Contribute/PseudoConstantTest.php diff --git a/tests/phpunit/CRM/Contribute/PseudoConstantTest.php b/tests/phpunit/CRM/Contribute/PseudoConstantTest.php new file mode 100644 index 0000000000..f402fe03ac --- /dev/null +++ b/tests/phpunit/CRM/Contribute/PseudoConstantTest.php @@ -0,0 +1,55 @@ +assertNull($settings); + CRM_Contribute_PseudoConstant::flush('contributeSettings'); + $params = array( + 'contribution_invoice_settings' => array( + 'deferred_revenue_enabled' => '1', + ), + ); + $this->callAPISuccess('Setting', 'create', $params); + $settings = CRM_Contribute_PseudoConstant::checkContributeSettings('deferred_revenue_enabled'); + $this->assertEquals($settings, 1, "Check for settings has failed"); + } + +} -- 2.25.1