From 5a59e20fd747df77be9b4d3a768cc65e81281755 Mon Sep 17 00:00:00 2001 From: Eileen Date: Wed, 24 Sep 2014 02:05:48 +0000 Subject: [PATCH] Do not merge to 4.5 - fixes to make backported api pass tests, one merged into 4.4 I'll do a merge PR to 4.5 to ensure this isn't merged as the fixes involve skipping tests due to upstream test framework changes not being in 4.4 --- CRM/Financial/BAO/FinancialAccount.php | 2 +- CRM/Financial/BAO/FinancialType.php | 2 +- tests/phpunit/api/v3/SyntaxConformanceTest.php | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CRM/Financial/BAO/FinancialAccount.php b/CRM/Financial/BAO/FinancialAccount.php index f2528f70bb..44112d0b3f 100644 --- a/CRM/Financial/BAO/FinancialAccount.php +++ b/CRM/Financial/BAO/FinancialAccount.php @@ -95,7 +95,7 @@ class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAcco * @static * @return object */ - static function add(&$params, &$ids) { + static function add(&$params, &$ids = array()) { $params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE); $params['is_deductible'] = CRM_Utils_Array::value('is_deductible', $params, FALSE); $params['is_tax'] = CRM_Utils_Array::value('is_tax', $params, FALSE); diff --git a/CRM/Financial/BAO/FinancialType.php b/CRM/Financial/BAO/FinancialType.php index 1c40b7359b..5b1d71c5e9 100644 --- a/CRM/Financial/BAO/FinancialType.php +++ b/CRM/Financial/BAO/FinancialType.php @@ -95,7 +95,7 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { * @static * @return object */ - static function add(&$params, &$ids) { + static function add(&$params, &$ids = array()) { $params['is_active'] = CRM_Utils_Array::value('is_active', $params, false); $params['is_deductible'] = CRM_Utils_Array::value('is_deductible', $params, false); $params['is_reserved'] = CRM_Utils_Array::value('is_reserved', $params, false); diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index 7527b27ec4..bdaa8fb5ef 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -248,6 +248,9 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { 'MailSettings', 'Setting', 'MailingContact', + //temporary for 4.4 - do not merge to 4.5 + 'FinancialType', + 'FinancialAccount', ); if ($sequential === TRUE) { return $entitiesWithout; @@ -286,6 +289,11 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { 'group_id', ), ), + 'ActivityContact' => array( + 'cant_update' => array( + 'activity_id', //we have an FK on activity_id + contact_id + record id so if we don't leave this one distinct we get an FK constraint error + ), + ), 'Address' => array( 'cant_update' => array( 'state_province_id', //issues with country id - need to ensure same country -- 2.25.1