Fix CRM/Event/BAO/AdditionalPaymentTest.php to use Order.create
authoreileen <emcnaughton@wikimedia.org>
Mon, 11 Nov 2019 09:54:47 +0000 (22:54 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 11 Nov 2019 20:41:55 +0000 (09:41 +1300)
commitac823f4afa5d39a85691a17217e0d03d49bf506b
tree676fe64cfdc0d22c0e08fc56c469e776b1d3fd74
parentb990fba4dd8e14c2053c04d5d385fdb670e155cb
Fix CRM/Event/BAO/AdditionalPaymentTest.php to use Order.create

This test wasn't really testing much since the functions were kinda contorted into doing what the
test was testing. I've updated it to do set up using Order.create & not to use the 'partial_amount_to_pay'
keys which turn out not to create valid transactions (& which we want to fully remove from the other places).

I had to co-erce tax_amount into a float in a couple of places & shortened a param for readability.

I commented out a couple of checks that only worked because of unrealisitic function calls
I added https://lab.civicrm.org/dev/financial/issues/102 to track that.
CRM/Price/BAO/LineItem.php
tests/phpunit/CRM/Contribute/Form/ContributionTest.php
tests/phpunit/CRM/Event/BAO/AdditionalPaymentTest.php
tests/phpunit/CRM/Event/BAO/ChangeFeeSelectionTest.php