Fix test to test trait not deprecated function
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 5 Sep 2021 00:34:09 +0000 (12:34 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 5 Sep 2021 00:34:09 +0000 (12:34 +1200)
tests/phpunit/CRM/Contact/Form/Task/EmailCommonTest.php

index 9eb49cdf6e633d8871c7cb45dcb48e66d6198aa4..a6bd772ab4222e704239c7be59512620d65598dd 100644 (file)
@@ -107,8 +107,8 @@ class CRM_Contact_Form_Task_EmailCommonTest extends CiviUnitTestCase {
     // This rule somehow disappears if there's a form-related test before us,
     // so register it again. See packages/HTML/QuickForm/file.php.
     $form->registerRule('maxfilesize', 'callback', '_ruleCheckMaxFileSize', 'HTML_QuickForm_file');
-    CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($form);
-    $form->buildQuickForm();
+    $form->isSearchContext = FALSE;
+    $form->buildForm();
     $form->submit(array_merge($form->_defaultValues, [
       'from_email_address' => $loggedInEmail['id'],
       'subject' => 'Really interesting stuff',