Fix comment block for variable declarations
[civicrm-core.git] / tests / phpunit / CRM / Batch / Form / EntryTest.php
index 816bc8af3899bf92932405634514d6fc03491210..1bd225198d72bfe39da7405958f8f5fbd1328fb0 100644 (file)
@@ -34,36 +34,42 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
 
   /**
    * 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;
 
@@ -200,8 +206,13 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
 
   /**
    *  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();
@@ -330,9 +341,11 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
   }
 
   /**
+   * @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),
@@ -344,7 +357,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
       '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,
@@ -353,7 +366,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
         ),
         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,
@@ -361,7 +374,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
           'contribution_status_id' => 1,
         ),
       ),
-      'actualBatchTotal' => 30,
+      'actualBatchTotal' => $this->formatMoneyInput(3000.30),
 
     );
   }