Add call to validateAllContributions & fix getTotalAmount
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 24 May 2021 02:29:04 +0000 (14:29 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 24 May 2021 04:39:29 +0000 (16:39 +1200)
commit53c8b1bebcbb6b0d974f57ba17615d3adf364ab5
treedbafa6bf8fc4e66dd80ab864744914940c05c82e
parenta0203d57d13306bf71b60733a2ca4a8ed5054b34
Add call to validateAllContributions & fix getTotalAmount

I've updated 2 tests for readability and extended one to call
validateAllContributions. The call failed and it turned out to
be the check was wrong. Fixing that caused a test to fail.
I have fixed the test by fixing getTotalAmount on the internal
helper BAO_Order class to include the tax_amount for each line
in the total.

I think this would most affect tests - but it might affect the
Membership_Form due to changes made recently to that
form so I'm on the fence about going for the rc with this
one
CRM/Financial/BAO/Order.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/ContributionPageTest.php
tests/phpunit/api/v3/ContributionTest.php