From 94183dd6f573496f54e4e2a9bb87511447e66159 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 6 Aug 2016 10:52:37 +1000 Subject: [PATCH] Fix Syntax Conformance test --- CRM/Contact/BAO/Group.php | 4 ++-- CRM/Contribute/BAO/Contribution.php | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) 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); + } + } + } -- 2.25.1