From 7af3d211af193fb277d8a28e42577b323a4bb013 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 23 Nov 2020 13:11:07 +1300 Subject: [PATCH] Remove test as not valid It is no longer possible to enter a contribution with a cancelled or failed status via the membership form so this test is not valid. Only pending or completed are permitted --- .../CRM/Member/Form/MembershipTest.php | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/tests/phpunit/CRM/Member/Form/MembershipTest.php b/tests/phpunit/CRM/Member/Form/MembershipTest.php index 9f61916847..61a88b684e 100644 --- a/tests/phpunit/CRM/Member/Form/MembershipTest.php +++ b/tests/phpunit/CRM/Member/Form/MembershipTest.php @@ -1029,36 +1029,6 @@ Expires: ', } - /** - * Test membership form with Failed Contribution. - * - * @throws \CRM_Core_Exception - */ - public function testFormWithFailedContribution() { - $form = $this->getForm(); - $form->preProcess(); - $this->createLoggedInUser(); - $params = $this->getBaseSubmitParams(); - unset($params['price_set_id']); - unset($params['credit_card_number']); - unset($params['cvv2']); - unset($params['credit_card_exp_date']); - unset($params['credit_card_type']); - unset($params['send_receipt']); - unset($params['is_recur']); - - $params['record_contribution'] = TRUE; - $params['contribution_status_id'] = array_search('Failed', CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name')); - $form->_mode = NULL; - $form->_contactID = $this->_individualId; - - $form->testSubmit($params); - $this->callAPISuccessGetSingle('Membership', ['contact_id' => $this->_individualId]); - $form->testSubmit($params); - $membership = $this->callAPISuccessGetSingle('Membership', ['contact_id' => $this->_individualId]); - $this->assertEquals($membership['status_id'], array_search('Pending', CRM_Member_PseudoConstant::membershipStatus(), TRUE)); - } - /** * CRM-20955, CRM-20966: * Test creating two memberships with inheritance via price set in the back end, -- 2.25.1