test fix, reflect changed BAO function in test, note this function is also
authoreileenmcnaughton <eileen@fuzion.co.nz>
Wed, 8 Jul 2015 08:39:58 +0000 (08:39 +0000)
committereileenmcnaughton <eileen@fuzion.co.nz>
Wed, 8 Jul 2015 08:39:58 +0000 (08:39 +0000)
tested through form submit functions - e.g CRM_Member_Form_MembershipTest

tests/phpunit/CRM/Member/BAO/MembershipTest.php

index 0b81f4f9e6eeea37258382158f118776cc6487bb..216af3994564af1f225b8974b6369ed6b5a86a71 100644 (file)
@@ -519,20 +519,21 @@ class CRM_Member_BAO_MembershipTest extends CiviUnitTestCase {
     $config = CRM_Core_Config::singleton();
     $config->keyDisable = TRUE;
 
-    $membershipRenewal = new CRM_Core_Form();
-    $membershipRenewal->controller = new CRM_Core_Controller();
     $isTestMembership = 0;
-    $MembershipRenew = CRM_Member_BAO_Membership::renewMembership(
+    list($MembershipRenew) = CRM_Member_BAO_Membership::renewMembership(
       $contactId,
       $this->_membershipTypeID,
       $isTestMembership,
-      $membershipRenewal,
       NULL,
       NULL,
       NULL,
       1,
+      FALSE,
+      NULL,
+      NULL,
+      FALSE,
       NULL,
-      FALSE
+      NULL
     );
     $endDate = date("Y-m-d", strtotime($membership->end_date . " +1 year"));
 
@@ -606,7 +607,7 @@ class CRM_Member_BAO_MembershipTest extends CiviUnitTestCase {
 
     $membershipRenewal = new CRM_Core_Form();
     $membershipRenewal->controller = new CRM_Core_Controller();
-    $MembershipRenew = CRM_Member_BAO_Membership::renewMembership(
+    list($MembershipRenew) = CRM_Member_BAO_Membership::renewMembership(
       $contactId,
       $this->_membershipTypeID,
       FALSE,
@@ -616,8 +617,11 @@ class CRM_Member_BAO_MembershipTest extends CiviUnitTestCase {
       NULL,
       1,
       NULL,
-      FALSE
-      );
+      NULL,
+      NULL,
+      FALSE,
+      NULL
+    );
 
     $this->assertDBNotNull('CRM_Member_BAO_MembershipLog',
       $MembershipRenew->id,