Skip to content

Commit

Permalink
Merge pull request #21686 from eileenmcnaughton/test_name
Browse files Browse the repository at this point in the history
Rename test clas to reflect tested class name
  • Loading branch information
demeritcowboy authored Oct 1, 2021
2 parents 98dbbb9 + bc06f84 commit 666451e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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']);
}

Expand Down Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 666451e

Please sign in to comment.