From b8f2d49bae3a9b0b7a07a12d0325a5af91c8c114 Mon Sep 17 00:00:00 2001 From: Edsel Date: Mon, 22 Feb 2016 17:27:07 +0530 Subject: [PATCH] CRM-16526 CIVI-3 Bug fixes ---------------------------------------- * CRM-16526: ACLs for Financial Types https://issues.civicrm.org/jira/browse/CRM-16526 --- tests/phpunit/api/v3/FinancialTypeACLTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/api/v3/FinancialTypeACLTest.php b/tests/phpunit/api/v3/FinancialTypeACLTest.php index 44012ca0c7..15f23eded6 100644 --- a/tests/phpunit/api/v3/FinancialTypeACLTest.php +++ b/tests/phpunit/api/v3/FinancialTypeACLTest.php @@ -196,7 +196,7 @@ class api_v3_FinancialTypeACLTest extends CiviUnitTestCase { $contribution = $this->callAPISuccess('Contribution', 'create', $this->_params); $params = array( - 'contribution_id' => $contribution['id'], + 'id' => $contribution['id'], 'check_permissions' => TRUE, ); $config = &CRM_Core_Config::singleton(); @@ -207,10 +207,14 @@ class api_v3_FinancialTypeACLTest extends CiviUnitTestCase { $contribution = $this->callAPISuccess('contribution', 'get', $params); $this->assertEquals($contribution['count'], 0); + CRM_Financial_BAO_FinancialType::$_availableFinancialTypes = NULL; + + $config = &CRM_Core_Config::singleton(); $config->userPermissionClass->permissions = array( 'access CiviCRM', 'access CiviContribute', 'view contributions of type Donation', + 'view debug output', ); $contribution = $this->callAPISuccess('contribution', 'get', $params); @@ -279,6 +283,8 @@ class api_v3_FinancialTypeACLTest extends CiviUnitTestCase { 'delete in CiviContribute', 'add contributions of type Member Dues', 'add contributions of type Donation', + 'view contributions of type Donation', + 'view contributions of type Member Dues', 'delete contributions of type Donation', 'delete contributions of type Member Dues', ); @@ -319,6 +325,7 @@ class api_v3_FinancialTypeACLTest extends CiviUnitTestCase { 'access CiviCRM', 'access CiviContribute', 'edit contributions', + 'view contributions of type Donation', ); $contribution = $this->callAPIFailure('Contribution', 'create', $params); -- 2.25.1