Details
-
Type: Sub-task
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.4.alpha
-
Fix Version/s: 3.4.beta
-
Component/s: Test suite
-
Labels:None
Description
Unit Test:
- Add 2 tests for CRM_Member_BAO_Member::renewMembership() - can be added to Member/BAO/MembershipTest.php
- one test should change the membership_type_id for the membership while renewing and validate that new end_date is assigned properly and that MembershipLog sets the correct values
- second test should renew a membership with a "stale" membership status - to test the code in fixMembershipStatusBeforeRenew()
Web Test:
- Add testOfflineMembershipRenewChangeType() function to existing Webtest/Member/OfflineMembershipRenew.php
- Add new test file - OnlineMembershipRenewTest, which tests online renewal. Will need to create membership for logged in user, and then renew that membership (using sample contribution page id=2). Test file should include two tests -
- testOnlineMembershipRenew()
- testOnlineMembershipRenewChangeType() - this test should verify that renewed membership retains original membership.id and join_date.