Merge pull request #11728 from JMAConsulting/CRM-21809
[civicrm-core.git] / tests / phpunit / WebTest / Member / OnlineAutoRenewMembershipGCTest.php
index 15d48f9e99ecc21de9cf76b9d36cbe0995088605..3043a846661dee0c92e12acaa0fdb5eca0d60316 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2018                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -56,9 +56,6 @@ class WebTest_Member_OnlineAutoRenewMembershipGCTest extends CiviSeleniumTestCas
 
     $this->click("_qf_Confirm_next_checkout");
 
-    // FIXME: By this time pending records has already been created. Formatting for external page (google checkout in this case)
-
-    // has changed a bit. No point in adding test for external page as we 'll test with fake transactions.
   }
 
   public function testOnlineAutoRenewMembershipAuthenticated() {
@@ -85,97 +82,6 @@ class WebTest_Member_OnlineAutoRenewMembershipGCTest extends CiviSeleniumTestCas
 
     $this->click("_qf_Confirm_next_checkout");
 
-    // FIXME: By this time pending records has already been created. Formatting for external page (google checkout in this case)
-
-    // has changed a bit. No point in adding test for external page as we 'll test with fake transactions.
-  }
-
-  /**
-   * @return null
-   */
-  public function _configureMembershipPage() {
-    static $pageId = NULL;
-
-    if (!$pageId) {
-      $this->webtestLogin();
-
-      //add payment processor.
-      $hash = substr(sha1(rand()), 0, 7);
-      $rand = 2 * rand(2, 50);
-      $processorName = "Webtest Auto Renew Google Checkout" . $hash;
-      $this->webtestAddPaymentProcessor($processorName, 'Google_Checkout');
-
-      // -- start updating membership types
-      $this->openCiviPage('admin/member/membershipType/add', 'action=update&id=1&reset=1');
-
-      $this->waitForElementPresent("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
-      $this->click("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
-
-      $this->type("duration_interval", "1");
-      $this->select("duration_unit", "label=year");
-
-      $this->click("_qf_MembershipType_upload-bottom");
-      $this->waitForPageToLoad($this->getTimeoutMsec());
-
-      $this->openCiviPage('admin/member/membershipType/add', 'action=update&id=2&reset=1');
-
-      $this->waitForElementPresent("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
-      $this->click("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
-
-      $this->type("duration_interval", "1");
-      $this->select("duration_unit", "label=year");
-
-      $this->click("_qf_MembershipType_upload-bottom");
-      $this->waitForPageToLoad($this->getTimeoutMsec());
-
-      // create contribution page with randomized title and default params
-      $amountSection = FALSE;
-      $payLater = TRUE;
-      $onBehalf = FALSE;
-      $pledges = FALSE;
-      $recurring = TRUE;
-      $membershipTypes = array(
-        array('id' => 1, 'auto_renew' => 1),
-        array('id' => 2, 'auto_renew' => 1),
-      );
-      $memPriceSetId = NULL;
-      $friend = TRUE;
-      $profilePreId = NULL;
-      $profilePostId = NULL;
-      $premiums = TRUE;
-      $widget = TRUE;
-      $pcp = TRUE;
-
-      $contributionTitle = "Title $hash";
-      $pageId = $this->webtestAddContributionPage($hash,
-        $rand,
-        $contributionTitle,
-        array($processorName => 'Google_Checkout'),
-        $amountSection,
-        $payLater,
-        $onBehalf,
-        $pledges,
-        $recurring,
-        $membershipTypes,
-        $memPriceSetId,
-        $friend,
-        $profilePreId,
-        $profilePostId,
-        $premiums,
-        $widget,
-        $pcp,
-        FALSE
-      );
-
-      //make sure we do have required permissions.
-      $permissions = array("edit-1-make-online-contributions", "edit-1-profile-listings-and-forms");
-      $this->changePermissions($permissions);
-
-      // now logout and do membership test that way
-      $this->webtestLogout();
-    }
-
-    return $pageId;
   }
 
 }