/**
* Membership type name used in test function.
- * @var String
+ *
+ * @var string
*/
protected $_membershipTypeName = NULL;
/**
* Membership type id used in test function.
- * @var String
+ *
+ * @var string
*/
protected $_membershipTypeID = NULL;
/**
* Contact id used in test function.
- * @var String
+ *
+ * @var string
*/
protected $_contactID = NULL;
/**
* Contact id used in test function.
- * @var String
+ *
+ * @var string
*/
protected $_contactID2 = NULL;
/**
* Contact id used in test function.
- * @var String
+ *
+ * @var string
*/
protected $_contactID3 = NULL;
/**
* Contact id used in test function.
- * @var String
+ *
+ * @var string
*/
protected $_contactID4 = NULL;
/**
* Test Contribution Import.
+ *
+ * @param $thousandSeparator
+ *
+ * @dataProvider getThousandSeparators
*/
- public function testProcessContribution() {
+ public function testProcessContribution($thousandSeparator) {
+ $this->setCurrencySeparators($thousandSeparator);
$this->offsetDefaultPriceSet();
$form = new CRM_Batch_Form_Entry();
$params = $this->getContributionData();
}
/**
+ * @param $thousandSeparator
+ *
* @return array
*/
- public function getContributionData() {
+ public function getContributionData($thousandSeparator = '.') {
return array(
//'batch_id' => 4,
'primary_profiles' => array(1 => NULL, 2 => NULL, 3 => NULL),
'field' => array(
1 => array(
'financial_type' => 1,
- 'total_amount' => 15,
+ 'total_amount' => $this->formatMoneyInput(1500.15),
'receive_date' => '2013-07-24',
'receive_date_time' => NULL,
'payment_instrument' => 1,
),
2 => array(
'financial_type' => 1,
- 'total_amount' => 15,
+ 'total_amount' => $this->formatMoneyInput(1500.15),
'receive_date' => '2013-07-24',
'receive_date_time' => NULL,
'payment_instrument' => 1,
'contribution_status_id' => 1,
),
),
- 'actualBatchTotal' => 30,
+ 'actualBatchTotal' => $this->formatMoneyInput(3000.30),
);
}