From 6b0a305480adbb8943351cb40eb8112d5c1dc673 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Tue, 18 May 2021 19:08:40 +0100 Subject: [PATCH] Update eventcart test to only test payment form --- tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php b/tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php index 7ef3200bd9..4e0e785788 100644 --- a/tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php +++ b/tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php @@ -92,9 +92,14 @@ class CRM_Financial_Form_PaymentFormsTest extends CiviUnitTestCase { $form->postProcess(); $qfKey = $form->controller->_key; } - $this->callAPISuccessGetSingle('Participant', ['participant_status_id' => 'Registered']); - $this->assertRequestValid(['x_city' => 'The+Shire', 'x_state' => 'IL', 'x_amount' => 1.0]); } + $participant = \Civi\Api4\Participant::get(FALSE) + ->addWhere('status_id:name', '=', 'Registered') + ->execute() + ->first(); + $this->assertEquals($cart->id, $participant['cart_id']); + $this->assertEquals(CRM_Core_PseudoConstant::getKey('CRM_Event_BAO_Participant', 'status_id', 'Registered'), $participant['status_id']); + $this->assertRequestValid(['x_city' => 'The+Shire', 'x_state' => 'IL', 'x_amount' => 1.0]); } } -- 2.25.1