From: Seamus Lee Date: Sun, 14 Aug 2022 23:02:52 +0000 (+1000) Subject: [NFC] Convert Payment Processor ID field to payment processor in event create in... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1481d5dff981a1f95cdea628da4ead6ef0907559;p=civicrm-core.git [NFC] Convert Payment Processor ID field to payment processor in event create in tests --- diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 567d4fe047..b833c72531 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -1137,7 +1137,9 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase { 'is_show_location' => 0, 'is_email_confirm' => 1, ], $params); - + if (!empty($params['payment_processor_id'])) { + $params['payment_processor'] = is_array($params['payment_processor_id']) ? $params['payment_processor_id'] : [$params['payment_processor_id']]; + } $event = Event::create(FALSE)->setValues($params)->execute()->first(); $this->ids['event'][] = $event['id']; return $event;