Test fix - assertion fails when run with other tests (sometimes)
authorYour Name <you@example.com>
Sat, 8 May 2021 03:52:45 +0000 (15:52 +1200)
committerYour Name <you@example.com>
Sat, 8 May 2021 03:53:11 +0000 (15:53 +1200)
commitecec407d81650a2baa8e1ac5c43b913580ae64e9
treee0ed626a9ebbb465126100f1736b0ca59ab76167
parent20a0376709a4616e32689a821a7e95ca255ed85f
Test fix - assertion fails when run with other tests (sometimes)

The assertion that invoice_number = INV_ + contribution_id is wrong. In fact
it is calculated as INV_ + (MAX(contribution_id)+1) prior to the contribution
being saved. This means that if the table has not been truncated the contribution
id might be 3 but the invoice_number would still be 0+1 - ie INV_1

- we could argue about whether the calculation method is flawed but this at least
makes the test more reliable and no-one has complained in practice about the
code behaviour
tests/phpunit/api/v3/ContributionTest.php