// We're using Quick Add block on the main page for this.
$firstContactName = 'TestExport' . substr(sha1(rand()), 0, 7);
- list($emailContactFirst,$prefixLabelContactFrst,$suffixLabelContactFrst,$genderLabelContactFrst) = WebTest_Export_ContactTest::webtestAddContactWithGenderPrefixSuffix($firstContactName, "Smith", "$firstContactName.smith@example.org", Null);
+ list($emailContactFirst, $prefixLabelContactFrst, $suffixLabelContactFrst, $genderLabelContactFrst) = WebTest_Export_ContactTest::webtestAddContactWithGenderPrefixSuffix($firstContactName, "Smith", "$firstContactName.smith@example.org", NULL);
$sortFirstName = "Smith, $firstContactName";
$displayFirstName = "$firstContactName Smith";
$this->waitForAjaxContent();
$secondContactName = 'TestExport2' . substr(sha1(rand()), 0, 7);
- list($emailContactSecond,$prefixLabelContactScnd,$suffixLabelContactScnd,$genderLabelContactScnd) = WebTest_Export_ContactTest::webtestAddContactWithGenderPrefixSuffix($secondContactName, "John", "$secondContactName.john@example.org", Null);
+ list($emailContactSecond, $prefixLabelContactScnd, $suffixLabelContactScnd, $genderLabelContactScnd) = WebTest_Export_ContactTest::webtestAddContactWithGenderPrefixSuffix($secondContactName, "John", "$secondContactName.john@example.org", NULL);
$sortSecondName = "John, $secondContactName";
$displaySecondName = "$secondContactName John";
$this->select("suffix_id", "value=$suffix");
$this->click("demographics");
$this->waitForElementPresent("civicrm_gender_Female_1");
- $this->click($genderLabel,"value=$gender");
+ $this->click($genderLabel, "value=$gender");
$this->waitForElementPresent('_qf_Contact_upload_view-bottom');
$this->click('_qf_Contact_upload_view-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $prefixLabel = WebTest_Export_ContactTest::getOptionLabel('individual_prefix',$prefix);
- $suffixLabel = WebTest_Export_ContactTest::getOptionLabel('individual_suffix',$suffix);
- $genderLabel = WebTest_Export_ContactTest::getOptionLabel('gender',$gender);
- return array($email,$prefixLabel,$suffixLabel,$genderLabel);
+ $prefixLabel = WebTest_Export_ContactTest::getOptionLabel('individual_prefix', $prefix);
+ $suffixLabel = WebTest_Export_ContactTest::getOptionLabel('individual_suffix', $suffix);
+ $genderLabel = WebTest_Export_ContactTest::getOptionLabel('gender', $gender);
+ return array($email, $prefixLabel, $suffixLabel, $genderLabel);
}
/**
*
* @return array|int
*/
- public function getOptionLabel($optionGroupName,$optionValue){
+ public function getOptionLabel($optionGroupName, $optionValue){
$params = array(
'version' => 3,
'sequential' => 1,
'value' => $optionValue,
'return' => 'label'
);
- $optionLabel = $this->webtest_civicrm_api("OptionValue", "getvalue",$params);
+ $optionLabel = $this->webtest_civicrm_api("OptionValue", "getvalue", $params);
return $optionLabel;
}
}