From: Seamus Lee Date: Sat, 6 Aug 2016 00:52:37 +0000 (+1000) Subject: Fix Syntax Conformance test X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=94183dd6f573496f54e4e2a9bb87511447e66159;p=civicrm-core.git Fix Syntax Conformance test --- diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index 444b11b8ca..2971d6a62c 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -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); } } diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 5ebdba9ef6..6a4f2221f8 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -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); + } + } + }