Combine 2 tests into one, they differ only by an additional check
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 19 Nov 2023 22:19:59 +0000 (11:19 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 20 Nov 2023 07:39:14 +0000 (20:39 +1300)
tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php
tests/phpunit/api/v3/ContributionPageTest.php

index cc246b2706c5e22e3fdc67265ee319e7156bc12b..2d1f0f9f26c85fcdc4e0e0b2aa26602d1203a6c1 100644 (file)
@@ -526,6 +526,7 @@ class CRM_Contribute_Form_Contribution_ConfirmTest extends CiviUnitTestCase {
       'Membership Fee',
       'Amount $100.00',
     ]);
+    $this->assertMailSentContainingHeaderString('Test Frontend title');
   }
 
 }
index 06e440dd3f9dd53a642915e833754b2073f161b6..ae883719e4ecd659e5c6b23f5fff7a398629f7c8 100644 (file)
@@ -306,42 +306,6 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase {
     $this->assertEquals(date('Y-m-d', strtotime('+ 2 year - 1 day')), $membership['end_date']);
   }
 
-  /**
-   * Test submit with a membership block in place.
-   */
-  public function testSubmitMembershipBlockNotSeparatePaymentWithEmail(): void {
-    $mut = new CiviMailUtils($this, TRUE);
-    $this->setUpMembershipContributionPage();
-    $this->addProfile('supporter_profile', $this->getContributionPageID());
-
-    $submitParams = [
-      $this->getPriceFieldLabel('contribution') => 1,
-      $this->getPriceFieldLabel('membership') => $this->getPriceFieldValue('general'),
-      'id' => $this->getContributionPageID(),
-      'billing_first_name' => 'Billy',
-      'billing_middle_name' => 'Goat',
-      'billing_last_name' => 'Gruff',
-      'selectMembership' => $this->ids['MembershipType'][0],
-      'email-Primary' => 'billy-goat@the-bridge.net',
-      'payment_processor_id' => $this->ids['PaymentProcessor']['dummy'],
-      'credit_card_number' => '4111111111111111',
-      'credit_card_type' => 'Visa',
-      'credit_card_exp_date' => ['M' => 9, 'Y' => 2040],
-      'cvv2' => 123,
-    ];
-
-    $this->callAPISuccess('ContributionPage', 'submit', $submitParams);
-    $contribution = $this->callAPISuccess('contribution', 'getsingle', ['contribution_page_id' => $this->getContributionPageID()]);
-    $this->callAPISuccess('MembershipPayment', 'getsingle', ['contribution_id' => $contribution['id']]);
-    $mut->checkMailLog([
-      'Membership Type',
-      'General',
-      'Test Frontend title',
-    ]);
-    $mut->stop();
-    $mut->clearMessages();
-  }
-
   /**
    * Test submit with a membership block in place.
    */