From 5d909b8b59f3a184a0ee214024e17ff19f2ab27d Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Wed, 18 Jan 2023 19:54:27 +0000 Subject: [PATCH] [REF][PHP8.2] Avoid dynamic properties in api_v3_EventTest --- tests/phpunit/api/v3/EventTest.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/api/v3/EventTest.php b/tests/phpunit/api/v3/EventTest.php index a9debb622a..8cce80bc11 100644 --- a/tests/phpunit/api/v3/EventTest.php +++ b/tests/phpunit/api/v3/EventTest.php @@ -18,6 +18,16 @@ class api_v3_EventTest extends CiviUnitTestCase { protected $_apiversion; protected $_entity; + /** + * @var int[] + */ + protected $_eventIds = []; + + /** + * @var array + */ + protected $_events = []; + public function setUp(): void { parent::setUp(); $this->_apiversion = 3; @@ -72,8 +82,8 @@ class api_v3_EventTest extends CiviUnitTestCase { ], ]; - $this->events = []; - $this->eventIds = []; + $this->_events = []; + $this->_eventIds = []; foreach ($params as $event) { $result = $this->callAPISuccess('Event', 'Create', $event); $this->_events[] = $result; @@ -82,9 +92,6 @@ class api_v3_EventTest extends CiviUnitTestCase { } public function tearDown(): void { - foreach ($this->eventIds as $eventId) { - $this->eventDelete($eventId); - } $tablesToTruncate = [ 'civicrm_participant', 'civicrm_event', -- 2.25.1