/**
* Check method testGetAvailableFinancialTypes()
- * @group ornery
*/
public function testGetAvailableFinancialTypes() {
$this->setACL();
'view contributions of type Donation',
'view contributions of type Member Dues',
));
-
+ $types = array();
CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($types);
$expectedResult = array(
1 => "Donation",
/**
* Check method testgetAvailableMembershipTypes()
- * @group ornery
*/
public function testgetAvailableMembershipTypes() {
// Create Membership types
/**
* Check method testPermissionedFinancialTypes()
- * @group ornery
*/
public function testPermissionedFinancialTypes() {
// First get all core permissions
if (isset(\Civi::$statics['CRM_Financial_BAO_FinancialType'])) {
unset(\Civi::$statics['CRM_Financial_BAO_FinancialType']);
}
+ if (isset(\Civi::$statics['CRM_Contribute_PseudoConstant'])) {
+ unset(\Civi::$statics['CRM_Contribute_PseudoConstant']);
+ }
CRM_Contribute_PseudoConstant::flush('financialType');
+ CRM_Contribute_PseudoConstant::flush('membershipType');
+ // Pseudoconstants may be saved to the cache table.
+ CRM_Core_DAO::executeQuery("TRUNCATE civicrm_cache");
+ CRM_Financial_BAO_FinancialType::$_statusACLFt = array();
CRM_Financial_BAO_FinancialType::$_availableFinancialTypes = NULL;
}