From 1481d5dff981a1f95cdea628da4ead6ef0907559 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 15 Aug 2022 09:02:52 +1000 Subject: [PATCH] [NFC] Convert Payment Processor ID field to payment processor in event create in tests --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.25.1