fix some spelling:
[civicrm-core.git] / tests / phpunit / WebTest / Event / PricesetMaxCountTest.php
index 3cdea2324ae5aad39ece26ab4beec0396e05e091..1f1b38dcc2c2ca8cca461f6009a4f7cc8033cf37 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -35,7 +35,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     parent::setUp();
   }
 
-  function testWithoutFieldCount() {
+  public function testWithoutFieldCount() {
     // Log in using webtestLogin() method
     $this->webtestLogin();
 
@@ -117,35 +117,28 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $pricesetLoc = $this->getLocation();
 
     // get text field Id.
-    $textFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']/table/tbody/tr[1]/td[9]/span[1]/a[2]@href"));
-    $textFieldId = explode('&', $textFieldId[0]);
-    $textFieldId = explode('=', $textFieldId[3]);
-    $textFieldId = $textFieldId[1];
+    $this->waitForElementPresent("xpath=//div[@id='crm-main-content-wrapper']/div/a[1]");
+    $textFieldIdURL = $this->getAttribute("xpath=//div[@id='field_page']/table/tbody/tr[1]/td[9]/span[1]/a[2]@href");
+    $textFieldId = $this->urlArg('fid', $textFieldIdURL);
 
     $this->open($pricesetLoc);
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // get select field id
     $this->click("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[8]/a");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[2]/span[2]");
     $selectFieldLoc = $this->getLocation();
-    $selectFieldId = $this->urlArg('fid');
+    $selectFieldURL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[9]/span[1]/a[2]@href");
+    $selectFieldId = $this->urlArg('fid', $selectFieldURL);
 
     // get select field ids
     // get select field option1
-    $selectFieldOp1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[7]/span[1]/a[1]@href"));
-    $selectFieldOp1 = explode('&', $selectFieldOp1[0]);
-    $selectFieldOp1 = explode('=', $selectFieldOp1[2]);
-    $selectFieldOp1 = $selectFieldOp1[1];
-
-    $this->open($selectFieldLoc);
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $selectFieldOp1URL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[7]/span[1]/a[1]@href");
+    $selectFieldOp1 = $this->urlArg('oid', $selectFieldOp1URL);
 
     // get select field option2
-    $selectFieldOp2 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[7]/span[1]/a[1]@href"));
-    $selectFieldOp2 = explode('&', $selectFieldOp2[0]);
-    $selectFieldOp2 = explode('=', $selectFieldOp2[2]);
-    $selectFieldOp2 = $selectFieldOp2[1];
+    $selectFieldOp2URL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[7]/span[1]/a[1]@href");
+    $selectFieldOp2 = $this->urlArg('oid', $selectFieldOp2URL);
 
     // create event.
     $eventTitle = 'Meeting - ' . substr(sha1(rand()), 0, 7);
@@ -177,7 +170,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->select("price_{$selectFieldId}", "value={$selectFieldOp1}");
 
     $this->type('first_name', 'Mary');
-    $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jones' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -205,7 +198,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     // exceed maximun count for text field, check for form rule
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '2');
     $this->type('first_name', 'Mary');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -233,7 +226,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->_checkConfirmationAndRegister();
   }
 
-  function testWithFieldCount() {
+  public function testWithFieldCount() {
     // Log in using webtestLogin() method
     $this->webtestLogin();
 
@@ -322,35 +315,28 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $pricesetLoc = $this->getLocation();
 
     // get text field Id.
-    $textFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[9]/span[1]/a[2]@href"));
-    $textFieldId = explode('&', $textFieldId[0]);
-    $textFieldId = explode('=', $textFieldId[3]);
-    $textFieldId = $textFieldId[1];
+    $this->waitForElementPresent("xpath=//div[@id='crm-main-content-wrapper']/div/a[1]");
+    $textFieldIdURL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[9]/span[1]/a[2]@href");
+    $textFieldId = $this->urlArg('fid', $textFieldIdURL);
 
     $this->open($pricesetLoc);
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // get select field id
     $this->click("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[8]/a");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[2]/span[2]");
     $selectFieldLoc = $this->getLocation();
-    $selectFieldId = $this->urlArg('fid');
+    $selectFieldURL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[9]/span[1]/a[2]@href");
+    $selectFieldId = $this->urlArg('fid', $selectFieldURL);
 
     // get select field ids
     // get select field option1
-    $selectFieldOp1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[7]/span[1]/a[1]@href"));
-    $selectFieldOp1 = explode('&', $selectFieldOp1[0]);
-    $selectFieldOp1 = explode('=', $selectFieldOp1[2]);
-    $selectFieldOp1 = $selectFieldOp1[1];
-
-    $this->open($selectFieldLoc);
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $selectFieldOp1URL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[7]/span[1]/a[1]@href");
+    $selectFieldOp1 = $this->urlArg('oid', $selectFieldOp1URL);
 
     // get select field option2
-    $selectFieldOp2 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[7]/span[1]/a[1]@href"));
-    $selectFieldOp2 = explode('&', $selectFieldOp2[0]);
-    $selectFieldOp2 = explode('=', $selectFieldOp2[2]);
-    $selectFieldOp2 = $selectFieldOp2[1];
+    $selectFieldOp2URL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[7]/span[1]/a[1]@href");
+    $selectFieldOp2 = $this->urlArg('oid', $selectFieldOp2URL);
 
     // create event.
     $eventTitle = 'Meeting - ' . substr(sha1(rand()), 0, 7);
@@ -380,7 +366,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '3');
 
     $this->type('first_name', 'Mary');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -410,7 +396,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     // check for form rule
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '2');
     $this->type('first_name', 'Mary');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -439,7 +425,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->_checkConfirmationAndRegister();
   }
 
-  function testAdditionalParticipantWithoutFieldCount() {
+  public function testAdditionalParticipantWithoutFieldCount() {
     // Log in using webtestLogin() method
     $this->webtestLogin();
 
@@ -521,35 +507,28 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $pricesetLoc = $this->getLocation();
 
     // get text field Id.
-    $textFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[9]/span[1]/a[2]@href"));
-    $textFieldId = explode('&', $textFieldId[0]);
-    $textFieldId = explode('=', $textFieldId[3]);
-    $textFieldId = $textFieldId[1];
+    $this->waitForElementPresent("xpath=//div[@id='crm-main-content-wrapper']/div/a[1]");
+    $textFieldURL = $this->getAttribute("xpath=//div[@id='field_page']/table/tbody/tr[1]/td[9]/span[1]/a[2]@href");
+    $textFieldId = $this->urlArg('fid', $textFieldURL);
 
     $this->open($pricesetLoc);
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // get select field id
     $this->click("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[8]/a");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[2]/span[2]");
     $selectFieldLoc = $this->getLocation();
-    $selectFieldId = $this->urlArg('fid');
+    $selectFieldURL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[9]/span[1]/a[2]@href");
+    $selectFieldId = $this->urlArg('fid', $selectFieldURL);
 
     // get select field ids
     // get select field option1
-    $selectFieldOp1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[7]/span[1]/a[1]@href"));
-    $selectFieldOp1 = explode('&', $selectFieldOp1[0]);
-    $selectFieldOp1 = explode('=', $selectFieldOp1[2]);
-    $selectFieldOp1 = $selectFieldOp1[1];
-
-    $this->open($selectFieldLoc);
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $selectFieldOp1URL = $this->getAttribute("xpath=//div[@id='field_page']/table/tbody/tr[1]/td[7]/span[1]/a[1]@href");
+    $selectFieldOp1 = $this->urlArg('oid', $selectFieldOp1URL);
 
     // get select field option2
-    $selectFieldOp2 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[7]/span[1]/a[1]@href"));
-    $selectFieldOp2 = explode('&', $selectFieldOp2[0]);
-    $selectFieldOp2 = explode('=', $selectFieldOp2[2]);
-    $selectFieldOp2 = $selectFieldOp2[1];
+    $selectFieldOp2URL = $this->getAttribute("xpath=//div[@id='field_page']/table/tbody/tr[2]/td[7]/span[1]/a[1]@href");
+    $selectFieldOp2 = $this->urlArg('oid', $selectFieldOp2URL);
 
     // create event.
     $eventTitle = 'Meeting - ' . substr(sha1(rand()), 0, 7);
@@ -585,7 +564,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '7');
 
     $this->type('first_name', 'Mary');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -606,7 +585,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '6');
 
     $this->type('first_name', 'Mary Add 2');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -627,7 +606,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '3');
 
     $this->type('first_name', 'Mary Add 2');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -671,7 +650,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '3');
 
     $this->type('first_name', 'Mary');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -702,7 +681,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '2');
 
     $this->type('first_name', 'Mary Add 1');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -731,7 +710,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->_checkConfirmationAndRegister();
   }
 
-  function testAdditionalParticipantWithFieldCount() {
+  public function testAdditionalParticipantWithFieldCount() {
     // Log in using webtestLogin() method
     $this->webtestLogin();
 
@@ -820,35 +799,28 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $pricesetLoc = $this->getLocation();
 
     // get text field Id.
-    $textFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[9]/span[1]/a[2]@href"));
-    $textFieldId = explode('&', $textFieldId[0]);
-    $textFieldId = explode('=', $textFieldId[3]);
-    $textFieldId = $textFieldId[1];
+    $this->waitForElementPresent("xpath=//div[@id='crm-main-content-wrapper']/div/a[1]");
+    $textFieldIdURL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[9]/span[1]/a[2]@href");
+    $textFieldId = $this->urlArg('fid', $textFieldIdURL);
 
     $this->open($pricesetLoc);
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // get select field id
     $this->click("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[8]/a");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[2]/span[2]");
     $selectFieldLoc = $this->getLocation();
-    $selectFieldId = $this->urlArg('fid');
+    $selectFieldURL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[9]/span[1]/a[2]@href");
+    $selectFieldId = $this->urlArg('fid', $selectFieldURL);
 
     // get select field ids
     // get select field option1
-    $selectFieldOp1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[7]/span[1]/a[1]@href"));
-    $selectFieldOp1 = explode('&', $selectFieldOp1[0]);
-    $selectFieldOp1 = explode('=', $selectFieldOp1[2]);
-    $selectFieldOp1 = $selectFieldOp1[1];
-
-    $this->open($selectFieldLoc);
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $selectFieldOp1URL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[7]/span[1]/a[1]@href");
+    $selectFieldOp1 = $this->urlArg('oid', $selectFieldOp1URL);
 
     // get select field option2
-    $selectFieldOp2 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[7]/span[1]/a[1]@href"));
-    $selectFieldOp2 = explode('&', $selectFieldOp2[0]);
-    $selectFieldOp2 = explode('=', $selectFieldOp2[2]);
-    $selectFieldOp2 = $selectFieldOp2[1];
+    $selectFieldOp2URL = $this->getAttribute("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[7]/span[1]/a[1]@href");
+    $selectFieldOp2 = $this->urlArg('oid', $selectFieldOp2URL);
 
     // create event.
     $eventTitle = 'Meeting - ' . substr(sha1(rand()), 0, 7);
@@ -884,7 +856,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '7');
 
     $this->type('first_name', 'Mary');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -905,7 +877,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '6');
 
     $this->type('first_name', 'Mary Add 1');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -926,7 +898,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '3');
 
     $this->type('first_name', 'Mary Add 2');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -970,7 +942,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '3');
 
     $this->type('first_name', 'Mary');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -1001,7 +973,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@id='price_{$textFieldId}']", '2');
 
     $this->type('first_name', 'Mary Add 1');
-    $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+    $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
     $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
     $this->type('email-Primary', $email);
 
@@ -1034,7 +1006,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
    * @param $setTitle
    * @param null $financialType
    */
-  function _testAddSet($setTitle, $financialType = NULL) {
+  public function _testAddSet($setTitle, $financialType = NULL) {
     $this->openCiviPage('admin/price', 'reset=1&action=add', '_qf_Set_next-bottom');
 
     // Enter Priceset fields (Title, Used For ...)
@@ -1055,7 +1027,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
   /**
    * @param $fields
    */
-  function _testAddPriceFields($fields) {
+  public function _testAddPriceFields($fields) {
     $fieldCount = count($fields);
     $count = 1;
     $this->waitForElementPresent('label');
@@ -1102,6 +1074,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
       else {
         $this->click('_qf_Field_next-bottom');
       }
+      $this->waitForAjaxContent();
       $this->waitForText('crm-notification-container', "Price Field '$label' has been saved.");
 
       $count++;
@@ -1112,7 +1085,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
    * @param $options
    * @param $fieldType
    */
-  function _testAddMultipleChoiceOptions($options, $fieldType) {
+  public function _testAddMultipleChoiceOptions($options, $fieldType) {
     foreach ($options as $oIndex => $oValue) {
       $this->type("option_label_{$oIndex}", $oValue['label']);
       $this->type("option_amount_{$oIndex}", $oValue['amount']);
@@ -1144,11 +1117,11 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
   }
 
   /**
-   * @param $params
+   * @param array $params
    *
    * @return string
    */
-  function _testAddEvent($params) {
+  public function _testAddEvent($params) {
     $this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom');
 
     $this->select('event_type_id', "value={$params['event_type_id']}");
@@ -1226,7 +1199,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     return $this->getLocation();
   }
 
-  function _fillRegisterWithBillingInfo() {
+  public function _fillRegisterWithBillingInfo() {
     $this->waitForElementPresent('credit_card_type');
     $this->select('credit_card_type', 'value=Visa');
     $this->type('credit_card_number', '4111111111111111');
@@ -1245,7 +1218,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
   }
 
-  function _checkConfirmationAndRegister() {
+  public function _checkConfirmationAndRegister() {
     $confirmStrings = array('Event Fee(s)', 'Billing Name and Address', 'Credit Card Information');
     $this->assertStringsPresent($confirmStrings);
     $this->click('_qf_Confirm_next-bottom');