Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename test clas to reflect tested class name #21686

Merged
merged 1 commit into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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