Webtests and CRM test fix
[civicrm-core.git] / tests / phpunit / WebTest / Contact / SearchBuilderTest.php
index cb7041f7c2840567eaa8be655619a840ce264f44..b9f7c237fb4a8a8c8637d85e7ac92b4bf280efa0 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_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     parent::setUp();
   }
 
-  function testSearchBuilderOptions() {
+  public function testSearchBuilderOptions() {
     $this->webtestLogin();
 
     $groupName = $this->WebtestAddGroup();
@@ -50,14 +50,14 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad();
 
     // We should get no results. But check the options are all still set
-    $this->waitForTextPresent('None found.');
+    $this->waitForTextPresent('No matches found for:');
     foreach (array($groupName, 'United States', 'Male') as $i => $label) {
       $this->waitForElementPresent("//span[@id='crm_search_value_1_$i']/select/option[2]");
       $this->assertSelectedLabel("//span[@id='crm_search_value_1_$i']/select", $label);
     }
   }
 
-  function testSearchBuilderRLIKE() {
+  public function testSearchBuilderRLIKE() {
     $this->webtestLogin();
 
     // Adding contact
@@ -75,7 +75,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
   /**
    * @param null $firstName
    */
-  function createDetailContact($firstName = NULL) {
+  public function createDetailContact($firstName = NULL) {
 
     if (!$firstName) {
       $firstName = substr(sha1(rand()), 0, 7);
@@ -112,7 +112,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("$firstName adv$firstName"));
   }
 
-  function testSearchBuilderContacts() {
+  public function testSearchBuilderContacts() {
     $this->webtestLogin();
 
     //Individual
@@ -219,7 +219,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
    * @param string $op
    * @param null $count
    */
-  function _searchBuilder($field, $fieldValue = NULL, $name = NULL, $op = '=', $count = NULL) {
+  public function _searchBuilder($field, $fieldValue = NULL, $name = NULL, $op = '=', $count = NULL) {
     // search builder using contacts(not using contactType)
     $this->openCiviPage("contact/search/builder", "reset=1");
     $this->enterValues(1, 1, 'Contacts', $field, NULL, $op, "$fieldValue");
@@ -239,7 +239,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
   /**
    * Enter form values in a Search Builder row
    */
-  function enterValues($set, $row, $entity, $field, $loc, $op, $value = '') {
+  public function enterValues($set, $row, $entity, $field, $loc, $op, $value = '') {
     if ($set > 1 && $row == 1) {
       $this->click('addBlock');
     }
@@ -285,7 +285,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
    * @param null $count
    * @param $field
    */
-  function _advancedSearch($fieldValue = NULL, $name = NULL, $contactType = NULL, $count = NULL, $field) {
+  public function _advancedSearch($fieldValue = NULL, $name = NULL, $contactType = NULL, $count = NULL, $field) {
     //advanced search by selecting the contactType
     $this->openCiviPage("contact/search/advanced", "reset=1");
     if (isset($contactType)) {
@@ -332,12 +332,12 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
 
   /**
    * @param $contactType
-   * @param $name
+   * @param string $name
    * @param $email
    * @param null $streetName
    * @param null $postalCode
    */
-  function _createContact($contactType, $name, $email, $streetName = NULL, $postalCode = NULL) {
+  public function _createContact($contactType, $name, $email, $streetName = NULL, $postalCode = NULL) {
     $this->openCiviPage('contact/add', array('reset' => 1, 'ct' => $contactType), '_qf_Contact_cancel');
 
     if ($contactType == 'Individual') {
@@ -375,7 +375,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
    * Webtest for CRM-12148
    *
    */
-  function testSearchBuilderfinancialType() {
+  public function testSearchBuilderfinancialType() {
     $this->webtestLogin();
 
     // add financial type
@@ -431,7 +431,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
    * Webtest for CRM-12588
    *
    */
-  function testSearchBuilderMembershipType() {
+  public function testSearchBuilderMembershipType() {
     $this->webtestLogin();
 
     // create first contact