Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[phpunit test only] - Add one additional data integrity check to ensure that after Edit Fin… #12645

Merged
merged 1 commit into from
Aug 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/phpunit/CRM/Member/Form/MembershipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,13 @@ public function testLineItemAmountOnSalesTax() {
$this->assertEquals($contribution['total_amount'], $lineItem['line_total'] + $lineItem['tax_amount']);
$this->assertEquals($contribution['tax_amount'], $lineItem['tax_amount']);

$financialItems = $this->callAPISuccess('FinancialItem', 'get', array());
$financialItems_sum = 0;
foreach ($financialItems['values'] as $financialItem) {
$financialItems_sum += $financialItem['amount'];
}
$this->assertEquals($contribution['total_amount'], $financialItems_sum);

// reset the price options static variable so not leave any dummy data, that might hamper other unit tests
\Civi::$statics['CRM_Price_BAO_PriceField']['priceOptions'] = NULL;
$this->disableTaxAndInvoicing();
Expand Down