testHandlingOfContributionInvoiceSetting() - More realistic data+assertion
authorTim Otten <totten@civicrm.org>
Thu, 30 Apr 2020 01:23:40 +0000 (18:23 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 30 Apr 2020 01:25:13 +0000 (18:25 -0700)
commitecda7f33f283066d56d2824671f3c6b43589a488
treeb0cde1a80aab36d44ba37a35c7c5022766b37fce
parent84d52986c4ebd93b55741bc62dcabe2c8a4e610e
testHandlingOfContributionInvoiceSetting() - More realistic data+assertion

In practice, for the old setting `contribution_invoice_settings`, the
`invoicing` property could take one of two values:

1. If enabled, the value is an array with trueish subkey: `['invoicing'=>['invoicing'=>1]]`
2. If disabled, the value is a numeric `0`: `['invoicing'=>0]`

Following this means better compatibility.

The format is counter-intuitive, and the unit-test sets the value to enabled
using a more intuitive format (`['invoicing'=>1]`).  It's currently valid to
`set()` this way, but `get()`ting the value produces the
more-compatible/historical format.
tests/phpunit/CRM/Core/BAO/SettingTest.php