diff --git a/tests/phpunit/CRM/Contact/Form/Task/EmailCommonTest.php b/tests/phpunit/CRM/Contact/Form/Task/EmailTest.php similarity index 93% rename from tests/phpunit/CRM/Contact/Form/Task/EmailCommonTest.php rename to tests/phpunit/CRM/Contact/Form/Task/EmailTest.php index 930bfbebc2d3..e7f05091f320 100644 --- a/tests/phpunit/CRM/Contact/Form/Task/EmailCommonTest.php +++ b/tests/phpunit/CRM/Contact/Form/Task/EmailTest.php @@ -12,15 +12,14 @@ use Civi\Api4\Activity; /** - * Test class for CRM_Contact_Form_Task_EmailCommon. + * Test class for CRM_Contact_Form_Task_Email. * @group headless */ -class CRM_Contact_Form_Task_EmailCommonTest extends CiviUnitTestCase { +class CRM_Contact_Form_Task_EmailTest extends CiviUnitTestCase { /** * Set up for tests. * - * @throws \CRM_Core_Exception */ protected function setUp(): void { parent::setUp(); @@ -46,16 +45,14 @@ public function tearDown(): void { /** * Test generating domain emails - * - * @throws \CRM_Core_Exception */ - public function testDomainEmailGeneration() { + public function testDomainEmailGeneration(): void { $emails = CRM_Core_BAO_Email::domainEmails(); $this->assertNotEmpty($emails); $optionValue = $this->callAPISuccess('OptionValue', 'Get', [ 'id' => $this->_optionValue['id'], ]); - $this->assertTrue(array_key_exists('"Seamus Lee" ', $emails)); + $this->assertArrayHasKey('"Seamus Lee" ', $emails); $this->assertEquals('"Seamus Lee" ', $optionValue['values'][$this->_optionValue['id']]['label']); } @@ -89,7 +86,7 @@ public function testPostProcessWithSignature(): void { 'signature_html' => '

This is a test Signature

', ]); - $to = $form_contactIds = $form_toContactEmails = []; + $to = $form_contactIds = []; for ($i = 0; $i < 27; $i++) { $email = 'spy' . $i . '@secretsquirrels.com'; $contactID = $this->individualCreate(['email' => $email]); diff --git a/tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php b/tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php index fb11da8bf1c3..a0b413935cdd 100644 --- a/tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php +++ b/tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php @@ -9,7 +9,7 @@ +--------------------------------------------------------------------+ */ /** - * Test class for CRM_Contact_Form_Task_EmailCommon. + * Test class for CRM_Mailing_Form_Task_AdhocMailing. * @group headless */ class CRM_Mailing_Form_Task_AdhocMailingTest extends CiviUnitTestCase {