From 3ea3989c94ded000f11e0f50c9180e081a8056fa Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Mon, 9 Jan 2023 19:38:52 +0000 Subject: [PATCH] [REF][PHP8.2] Avoid dynamic properties in queue tests --- tests/phpunit/CRM/Queue/Queue/SqlTest.php | 10 ++++++++++ tests/phpunit/CRM/Queue/QueueTest.php | 10 ++++++++++ tests/phpunit/CRM/Queue/RunnerTest.php | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/tests/phpunit/CRM/Queue/Queue/SqlTest.php b/tests/phpunit/CRM/Queue/Queue/SqlTest.php index 6de10ed62213..a2eaa05ed24c 100644 --- a/tests/phpunit/CRM/Queue/Queue/SqlTest.php +++ b/tests/phpunit/CRM/Queue/Queue/SqlTest.php @@ -20,6 +20,16 @@ class CRM_Queue_Queue_SqlTest extends CiviUnitTestCase { use \Civi\Test\QueueTestTrait; + /** + * @var CRM_Queue_Service + */ + private $queueService; + + /** + * @var CRM_Queue_Queue + */ + private $queue; + /* ----------------------- Queue providers ----------------------- */ /* Define a list of queue providers which should be tested */ diff --git a/tests/phpunit/CRM/Queue/QueueTest.php b/tests/phpunit/CRM/Queue/QueueTest.php index 426687c98bcc..1ec3c33cd580 100644 --- a/tests/phpunit/CRM/Queue/QueueTest.php +++ b/tests/phpunit/CRM/Queue/QueueTest.php @@ -18,6 +18,16 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { use \Civi\Test\QueueTestTrait; + /** + * @var CRM_Queue_Service + */ + private $queueService; + + /** + * @var CRM_Queue_Queue + */ + private $queue; + /* ----------------------- Queue providers ----------------------- */ /* Define a list of queue providers which should be tested */ diff --git a/tests/phpunit/CRM/Queue/RunnerTest.php b/tests/phpunit/CRM/Queue/RunnerTest.php index a179fa9d51b9..20c538bae0ec 100644 --- a/tests/phpunit/CRM/Queue/RunnerTest.php +++ b/tests/phpunit/CRM/Queue/RunnerTest.php @@ -18,6 +18,16 @@ class CRM_Queue_RunnerTest extends CiviUnitTestCase { use \Civi\Test\QueueTestTrait; + /** + * @var CRM_Queue_Service + */ + private $queueService; + + /** + * @var CRM_Queue_Queue + */ + private $queue; + public function setUp(): void { parent::setUp(); $this->queueService = CRM_Queue_Service::singleton(TRUE);