From 2198c8610dcadec2716da4a654c50de04238fb25 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 11 Mar 2023 07:55:20 +1100 Subject: [PATCH] [NFC] Fix PHP8.2 issues in the Mailing Contact Test --- tests/phpunit/api/v3/MailingContactTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/api/v3/MailingContactTest.php b/tests/phpunit/api/v3/MailingContactTest.php index 9fe67eb990..f9e72752a7 100644 --- a/tests/phpunit/api/v3/MailingContactTest.php +++ b/tests/phpunit/api/v3/MailingContactTest.php @@ -24,7 +24,7 @@ * @group headless */ class api_v3_MailingContactTest extends CiviUnitTestCase { - protected $_entity = 'mailing'; + protected $contact; public function setUp(): void { parent::setUp(); @@ -33,11 +33,11 @@ class api_v3_MailingContactTest extends CiviUnitTestCase { 'contact_type' => 'Individual', 'last_name' => 'xyz1', ]; - $this->_contact = $this->callAPISuccess("contact", "create", $params); + $this->contact = $this->callAPISuccess("contact", "create", $params); } public function tearDown(): void { - $this->callAPISuccess("contact", "delete", ['id' => $this->_contact['id']]); + $this->callAPISuccess("contact", "delete", ['id' => $this->contact['id']]); parent::tearDown(); } @@ -88,7 +88,7 @@ class api_v3_MailingContactTest extends CiviUnitTestCase { */ public function testMailingContactNoMailings() { $params = [ - 'contact_id' => $this->_contact['id'], + 'contact_id' => $this->contact['id'], ]; $result = $this->callAPISuccess('MailingContact', 'get', $params); $this->assertEquals($result['count'], 0); -- 2.25.1