From 9775afa3cf5c9dfbd9e3b6f5ee6458b706a9d454 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Fri, 18 Feb 2022 11:37:55 +0000 Subject: [PATCH] Delete paymentprocessor between tests --- tests/phpunit/CRM/Contribute/Form/RecurForms.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/phpunit/CRM/Contribute/Form/RecurForms.php b/tests/phpunit/CRM/Contribute/Form/RecurForms.php index 19210e3946..0126e41822 100644 --- a/tests/phpunit/CRM/Contribute/Form/RecurForms.php +++ b/tests/phpunit/CRM/Contribute/Form/RecurForms.php @@ -19,6 +19,15 @@ class CRM_Contribute_Form_RecurForms extends CiviUnitTestCase { */ protected $paymentProcessorId; + public function tearDown(): void { + if ($this->paymentProcessorId) { + \Civi\Api4\PaymentProcessor::delete(FALSE) + ->addWhere('id', '=', $this->paymentProcessorId) + ->execute(); + } + parent::tearDown(); + } + /** * Get contact id. * -- 2.25.1