[REF][PHP8.2] Use correct form object to ensure properties exist
authorBradley Taylor <hello@brad-taylor.co.uk>
Thu, 21 Dec 2023 19:53:45 +0000 (19:53 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Thu, 21 Dec 2023 22:38:52 +0000 (22:38 +0000)
tests/phpunit/CRM/Contact/Form/Task/SMSCommonTest.php

index a34ba3946b2cd5529cda22d7ed6cb5ad80e2afbd..1b6d5f28ab08a0304978b70859ce19610c8c877a 100644 (file)
@@ -97,7 +97,8 @@ class CRM_Contact_Form_Task_SMSCommonTest extends CiviUnitTestCase {
    * Test to ensure SMS Activity QuickForm displays the right phone numbers.
    */
   public function testQuickFormMobileNumbersDisplay(): void {
-    $form = $this->getFormObject('CRM_Core_Form');
+    /** @var CRM_Activity_Form_Task_SMS $form */
+    $form = $this->getFormObject('CRM_Contact_Form_Task_SMS');
     $form->_contactIds = array_values($this->ids['Contact']);
     $form->_single = FALSE;
     CRM_Contact_Form_Task_SMSCommon::buildQuickForm($form);