<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
parent::setUp();
}
- function testWithoutFieldCount() {
+ public function testWithoutFieldCount() {
// Log in using webtestLogin() method
$this->webtestLogin();
$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);
// 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);
$this->_checkConfirmationAndRegister();
}
- function testWithFieldCount() {
+ public function testWithFieldCount() {
// Log in using webtestLogin() method
$this->webtestLogin();
$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);
// 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);
$this->_checkConfirmationAndRegister();
}
- function testAdditionalParticipantWithoutFieldCount() {
+ public function testAdditionalParticipantWithoutFieldCount() {
// Log in using webtestLogin() method
$this->webtestLogin();
$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);
$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);
$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);
$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);
$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);
$this->_checkConfirmationAndRegister();
}
- function testAdditionalParticipantWithFieldCount() {
+ public function testAdditionalParticipantWithFieldCount() {
// Log in using webtestLogin() method
$this->webtestLogin();
$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);
$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);
$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);
$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);
$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);
* @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 ...)
/**
* @param $fields
*/
- function _testAddPriceFields($fields) {
+ public function _testAddPriceFields($fields) {
$fieldCount = count($fields);
$count = 1;
$this->waitForElementPresent('label');
else {
$this->click('_qf_Field_next-bottom');
}
+ $this->waitForAjaxContent();
$this->waitForText('crm-notification-container', "Price Field '$label' has been saved.");
$count++;
* @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']);
}
/**
- * @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']}");
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');
$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');