Skip to content

Add in an assertion that the number of financial items / financial trxns we expect matches what is in the database

seamuslee requested to merge change_ft_financial_items_assert into master

When I run these unit tests locally I get some failures with the new assertion

1) CRM_Lineitemedit_Form_EditTest::testFinancialTypeChange
Failed asserting that 5 matches expected 3.

/home/seamus/buildkit/build/47-test/web/sites/default/files/civicrm/ext/biz.jmaconsulting.lineitemedit/tests/phpunit/CRM/Lineitemedit/Form/BaseTest.php:187
/home/seamus/buildkit/build/47-test/web/sites/default/files/civicrm/ext/biz.jmaconsulting.lineitemedit/tests/phpunit/CRM/Lineitemedit/Form/EditTest.php:301
/home/seamus/buildkit/extern/phpunit9/phpunit9.phar:2307

2) CRM_Lineitemedit_Form_EditTest::testFinancialTypeChangeWithPriceSet
Failed asserting that 5 matches expected 3.

/home/seamus/buildkit/build/47-test/web/sites/default/files/civicrm/ext/biz.jmaconsulting.lineitemedit/tests/phpunit/CRM/Lineitemedit/Form/BaseTest.php:187
/home/seamus/buildkit/build/47-test/web/sites/default/files/civicrm/ext/biz.jmaconsulting.lineitemedit/tests/phpunit/CRM/Lineitemedit/Form/EditTest.php:387
/home/seamus/buildkit/extern/phpunit9/phpunit9.phar:2307

3) CRM_Lineitemedit_Form_SaleTax_EditTest::testFinancialTypeChangeWithPriceSet
Failed asserting that 10 matches expected 6.

/home/seamus/buildkit/build/47-test/web/sites/default/files/civicrm/ext/biz.jmaconsulting.lineitemedit/tests/phpunit/CRM/Lineitemedit/Form/BaseTest.php:187
/home/seamus/buildkit/build/47-test/web/sites/default/files/civicrm/ext/biz.jmaconsulting.lineitemedit/tests/phpunit/CRM/Lineitemedit/Form/SaleTax/EditTest.php:397
/home/seamus/buildkit/extern/phpunit9/phpunit9.phar:2307

Which makes me wondering if we are getting too many financial item records being created or if the tests aren't right

ping @monish.deb @JoeMurray

Edited by seamuslee

Merge request reports

Loading