From 34dee1d7dc862b014528b2847c346571ac0aca66 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 21 Jan 2020 10:17:05 +1300 Subject: [PATCH] Assert on fail --- tests/phpunit/CRM/Event/Form/ParticipantTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/phpunit/CRM/Event/Form/ParticipantTest.php b/tests/phpunit/CRM/Event/Form/ParticipantTest.php index 6fdf41e5aa..d142ddab31 100644 --- a/tests/phpunit/CRM/Event/Form/ParticipantTest.php +++ b/tests/phpunit/CRM/Event/Form/ParticipantTest.php @@ -13,6 +13,18 @@ class CRM_Event_Form_ParticipantTest extends CiviUnitTestCase { parent::setUp(); } + /** + * CHeck that all tests that have created payments have created them with the right financial entities. + * + * Ideally this would be on CiviUnitTestCase but many classes would still fail. Also, it might + * be good if it only ran on tests that created at least one contribution. + * + * @throws \CRM_Core_Exception + */ + protected function assertPostConditions() { + $this->validateAllPayments(); + } + /** * Initial test of submit function. * -- 2.25.1