Merge pull request #6031 from eileenmcnaughton/CRM-16699
[civicrm-core.git] / tests / phpunit / CRM / Member / Form / MembershipTest.php
index 5632513b1456dc2b75b6a0a3cd98d5d925f98ddd..91f875101c5d7e4fea8ac5560e536700424473ce 100644 (file)
@@ -136,7 +136,7 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase {
   public function testFormRuleEmptyContact() {
     $params = array(
       'contact_select_id' => 0,
-      'membership_type_id' => array(),
+      'membership_type_id' => array(1 => NULL),
     );
     $files = array();
     $obj = new CRM_Member_Form_Membership();
@@ -425,7 +425,8 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase {
       'join_date' => date('m/d/Y', time()),
       'start_date' => '',
       'end_date' => '',
-      'membership_type_id' => array('25'),
+      // This format reflects the 1 being the organisation & the 25 being the type.
+      'membership_type_id' => array(1, 25),
       'auto_renew' => '0',
       'max_related' => '',
       'num_terms' => '1',
@@ -453,9 +454,7 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase {
       'billing_country_id-5' => '1228',
     );
     $form->submit($params);
-    // TODO: This will still fail right now.
-    //$this->callAPISuccessGetCount('Membership', array('contact_id' => $this->_individualId), 1);
+    $this->callAPISuccessGetCount('Membership', array('contact_id' => $this->_individualId), 1);
   }
 
 }
-// class CRM_Member_Form_MembershipTest