<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
parent::setUp();
}
- function testGroupAdd() {
+ public function testGroupAdd() {
$this->webtestLogin();
$this->openCiviPage('group/add', 'reset=1', '_qf_Edit_upload-bottom');
$this->assertElementContainsText("css=div.crm-summary-display_name", $displayName);
}
- function testGroupReserved() {
+ public function testGroupReserved() {
$this->webtestLogin('admin');
$this->openCiviPage('group/add', 'reset=1', '_qf_Edit_upload-bottom');
}
/**
- * @param $roleid
+ * @param int $roleid
*
* @return string
*/
- function _testCreateUser($roleid) {
+ public function _testCreateUser($roleid) {
$this->open($this->sboxPath . "admin/people/create");
$this->waitForElementPresent("edit-submit");
/**
* @param $role
*/
- function _roleDelete($role) {
+ public function _roleDelete($role) {
$this->waitForElementPresent("xpath=//table[@id='user-roles']/tbody//tr/td[text()='{$role}']/..//td/a[text()='edit role']");
$this->click("xpath=//table[@id='user-roles']/tbody//tr/td[text()='{$role}']/..//td/a[text()='edit role']");
$this->waitForElementPresent('edit-delete');
$this->waitForTextPresent("The role has been deleted.");
}
- /**
- * Webtest for add contact to group (CRM-15108)
- */
- function testAddContactToGroup() {
+ /**
+ * Webtest for add contact to group (CRM-15108)
+ */
+ public function testAddContactToGroup() {
$this->webtestLogin();
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->waitForElementPresent('_qf_Contact_upload_view-bottom');
//Create contact.
$group = "Advisory Board";
- $firstName = "Adams".substr(sha1(rand()), 0, 4);
+ $firstName = "Adams" . substr(sha1(rand()), 0, 4);
$lastName = substr(sha1(rand()), 0, 4);
$email = "{$lastName}.{$firstName}@example.org";
$this->type('first_name', $firstName);
$this->openCiviPage('contact/search', 'reset=1');
$this->waitForElementPresent("_qf_Basic_refresh");
$this->type('sort_name', $firstName);
- $this->select('group',"Advisory Board");
+ $this->select('group', "Advisory Board");
$this->click('_qf_Basic_refresh');
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[3]/a[text()='{$lastName}, {$firstName}']"));