Attempt to fix unrelated test fail
authoreileen <emcnaughton@wikimedia.org>
Wed, 13 Feb 2019 18:03:39 +0000 (07:03 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 13 Feb 2019 18:03:39 +0000 (07:03 +1300)
This test keeps failing on an unrelated test - perhaps  ['cid'] is
being set & somehow retained - could explain other intermittents

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

index 8535fb2ea5be78ffafd4af672fdccff4b49fa536..4348bc26adc9908830584afb09c1e55bf850c78c 100644 (file)
@@ -144,14 +144,6 @@ class CRM_Member_Form_MembershipTest extends CiviUnitTestCase {
     $this->callAPISuccess('relationship_type', 'delete', array('id' => 20));
   }
 
-  /**
-   *  Test CRM_Member_Form_Membership::buildQuickForm()
-   */
-  //function testCRMMemberFormMembershipBuildQuickForm()
-  //{
-  //    throw new PHPUnit_Framework_IncompleteTestError( "not implemented" );
-  //}
-
   /**
    *  Test CRM_Member_Form_Membership::formRule() with a parameter
    *  that has an empty contact_select_id value
@@ -1112,6 +1104,9 @@ Expires: ',
    * @return \CRM_Member_Form_Membership
    */
   protected function getForm() {
+    if (isset($_REQUEST['cid'])) {
+      unset($_REQUEST['cid']);
+    }
     $form = new CRM_Member_Form_Membership();
     $_SERVER['REQUEST_METHOD'] = 'GET';
     $form->controller = new CRM_Core_Controller();