From 6081bc3fbdfcfcb78f85f96be2ed169d2574c626 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 20 Nov 2023 11:19:59 +1300 Subject: [PATCH] Combine 2 tests into one, they differ only by an additional check --- .../Form/Contribution/ConfirmTest.php | 1 + tests/phpunit/api/v3/ContributionPageTest.php | 36 ------------------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php b/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php index cc246b2706..2d1f0f9f26 100644 --- a/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php +++ b/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php @@ -526,6 +526,7 @@ class CRM_Contribute_Form_Contribution_ConfirmTest extends CiviUnitTestCase { 'Membership Fee', 'Amount $100.00', ]); + $this->assertMailSentContainingHeaderString('Test Frontend title'); } } diff --git a/tests/phpunit/api/v3/ContributionPageTest.php b/tests/phpunit/api/v3/ContributionPageTest.php index 06e440dd3f..ae883719e4 100644 --- a/tests/phpunit/api/v3/ContributionPageTest.php +++ b/tests/phpunit/api/v3/ContributionPageTest.php @@ -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. */ -- 2.25.1