-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21686 from eileenmcnaughton/test_name
Rename test clas to reflect tested class name
- Loading branch information
Showing
2 changed files
with
6 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" <[email protected]>', $emails)); | ||
$this->assertArrayHasKey('"Seamus Lee" <[email protected]>', $emails); | ||
$this->assertEquals('"Seamus Lee" <[email protected]>', $optionValue['values'][$this->_optionValue['id']]['label']); | ||
} | ||
|
||
|
@@ -89,7 +86,7 @@ public function testPostProcessWithSignature(): void { | |
'signature_html' => '<p>This is a test Signature</p>', | ||
]); | ||
|
||
$to = $form_contactIds = $form_toContactEmails = []; | ||
$to = $form_contactIds = []; | ||
for ($i = 0; $i < 27; $i++) { | ||
$email = 'spy' . $i . '@secretsquirrels.com'; | ||
$contactID = $this->individualCreate(['email' => $email]); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters