Skip to content
Snippets Groups Projects
Commit e7bf9313 authored by pratik.joshi's avatar pratik.joshi
Browse files

Merge pull request #2757 from jitendrapurohit/API_Testfix

API test fixes
parents 021da9cd db47ea7b
Branches
Tags
No related merge requests found
......@@ -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);
......
......@@ -89,7 +89,7 @@ class CRM_Mailing_BAO_Component extends CRM_Mailing_DAO_Component {
* @access public
* @static
*/
static function add(&$params, &$ids) {
static function add(&$params, &$ids = array()) {
// action is taken depending upon the mode
$component = new CRM_Mailing_DAO_Component();
$component->name = $params['name'];
......
......@@ -62,11 +62,9 @@ function contribution_create_expectedresult(){
'source' => 'SSF',
'amount_level' => '',
'contribution_recur_id' => '',
'honor_contact_id' => '',
'is_test' => '',
'is_pay_later' => '',
'contribution_status_id' => '2',
'honor_type_id' => '',
'address_id' => '',
'check_number' => '',
'campaign_id' => '',
......
......@@ -321,7 +321,9 @@ function _civicrm_api3_get_DAO($name) {
}
// Really weird apis can declare their own DAO name. Not sure if this is a good idea...
include_once "api/v3/$name.php";
if(file_exists("api/v3/$name.php")) {
include_once "api/v3/$name.php";
}
$daoFn = "_civicrm_api3_" . _civicrm_api_get_entity_name_from_camel($name) . "_DAO";
if (function_exists($daoFn)) {
return $daoFn();
......
......@@ -187,7 +187,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
return array(
'batch_id' => 4,
'primary_profiles' => array(1 => NULL, 2 => NULL, 3 => NULL),
'primary_contact_select_id' => Array (
'primary_contact_id' => Array (
1 => $this->_contactID,
2 => $this->_contactID2,
3 => $this->_contactID3,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment