Skip to content

Commit

Permalink
Delete paymentprocessor between tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwire committed Feb 18, 2022
1 parent 7403f6a commit 9775afa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/phpunit/CRM/Contribute/Form/RecurForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 9775afa

Please sign in to comment.