Fix Syntax Conformance test
authorSeamus Lee <seamuslee001@gmail.com>
Sat, 6 Aug 2016 00:52:37 +0000 (10:52 +1000)
committereileenmcnaugton <eileen@fuzion.co.nz>
Sun, 7 Aug 2016 22:44:32 +0000 (10:44 +1200)
CRM/Contact/BAO/Group.php
CRM/Contribute/BAO/Contribution.php

index 444b11b8cafe51305fb1298c1fbd202e6692793f..2971d6a62c58e316d9b188d2b79310bee40e73b7 100644 (file)
@@ -1331,11 +1331,11 @@ WHERE {$whereClause}";
    * @param int $counter
    */
   protected function assignTestValue($fieldName, &$fieldDef, $counter) {
-    if ($fieldName == 'children' || $fieldName = 'parents') {
+    if ($fieldName == 'children' || $fieldName == 'parents') {
       $this->{$fieldName} = "NULL";
     }
     else {
-      parent::assignTestValues($fieldaName, $fieldDef, $counter);
+      parent::assignTestValues($fieldName, $fieldDef, $counter);
     }
   }
 
index 5ebdba9ef6a3edf91140aab3018da61204115d5e..6a4f2221f895cba44642b8eb53ef4efc65f95a4c 100644 (file)
@@ -5200,4 +5200,29 @@ LEFT JOIN  civicrm_contribution on (civicrm_contribution.contact_id = civicrm_co
     return $statusMsg;
   }
 
+  /**
+   * Assign Test Value.
+   *
+   * @param string $fieldName
+   * @param array $fieldDef
+   * @param int $counter
+   */
+  protected function assignTestValue($fieldName, &$fieldDef, $counter) {
+    if ($fieldName == 'tax_amount') {
+      $this->{$fieldName} = "0.00";
+    }
+    elseif ($fieldName == 'net_amount') {
+      $this->{$fieldName} = "2.00";
+    }
+    elseif ($fieldName == 'total_amount') {
+      $this->{$fieldName} = "3.00";
+    }
+    elseif ($fieldName == 'fee_amount') {
+      $this->{$fieldName} = "1.00";
+    }
+    else {
+      parent::assignTestValues($fieldName, $fieldDef, $counter);
+    }
+  }
+
 }