From a91b81310dfb0824af0bb0688bcdc44d51a4c1b2 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sun, 19 Jan 2020 07:48:06 +1100 Subject: [PATCH] Extend unit test to cover for recent refactor by eileen to ensure support for CRM-4196 remains --- tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php b/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php index cae3633d36..f37ae9d2da 100644 --- a/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php +++ b/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php @@ -165,6 +165,7 @@ class CRM_Event_Form_Registration_ConfirmTest extends CiviUnitTestCase { $this->assertEquals(8000.67, $contribution['total_amount']); $this->assertEquals(1.67, $contribution['fee_amount']); $this->assertEquals(7999, $contribution['net_amount']); + $this->assertNotContains(' (multiple participants)', $contribution['amount_level']); $lastFinancialTrxnId = CRM_Core_BAO_FinancialTrxn::getFinancialTrxnId($contribution['id'], 'DESC'); $financialTrxn = $this->callAPISuccessGetSingle( 'FinancialTrxn', @@ -291,9 +292,10 @@ class CRM_Event_Form_Registration_ConfirmTest extends CiviUnitTestCase { $contribution = $this->callAPISuccessGetSingle( 'Contribution', [ - 'return' => ['tax_amount', 'total_amount'], + 'return' => ['tax_amount', 'total_amount', 'amount_level'], ] ); + $this->assertContains(' (multiple participants)', $contribution['amount_level']); $this->assertEquals($contribution['tax_amount'], 40, 'Invalid Tax amount.'); $this->assertEquals($contribution['total_amount'], 440, 'Invalid Tax amount.'); $mailSent = $mut->getAllMessages(); -- 2.25.1