Notice: Undefined variable: mailManager in Drupal\uc_order\Form\MailInvoiceForm->__construct()
This was a result of the refactoring I did as part of #2927419: Dependency injection for Forms. The fact that this error got put in exposed the fact that we don't have any tests for the "Invoice" tab on the order administration page. This tab lets the administrator View, Print, and Email invoices.
So first, here's a set of tests for these three invoice functions. THESE TESTS SHOULD FAIL because of the bug. Then I will upload a patch that contains both a fix for the bug AND the tests, and that should work, demonstrating that the tests will catch the bug (and many other problems as well).
Comment | File | Size | Author |
---|---|---|---|
#3 | mail-manager-with-tests.patch | 4.88 KB | TR |
| |||
order-invoice-tests.patch | 4.42 KB | TR | |
Comments
Comment #2
TR CreditAttribution: TR commentedComment #3
TR CreditAttribution: TR commentedAnd here's the patch with the fix and the tests.
Comment #6
TR CreditAttribution: TR commentedOK, first one failed as expected, second one passed as expected. Committed fix and tests.