Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2014-12-16-01-08-03
[civicrm-core.git] / tests / phpunit / WebTest / Contact / SearchbyDateFilterTest.php
index d0ec048e9e590d59e9590e30cf91a91265556667..0f58868dc2702c73f6713e2c0f776653ab246a62 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 */
 
 require_once 'CiviTest/CiviSeleniumTestCase.php';
+
+/**
+ * Class WebTest_Contact_SearchbyDateFilterTest
+ */
 class WebTest_Contact_SearchbyDateFilterTest extends CiviSeleniumTestCase {
 
   protected function setUp() {
@@ -32,7 +36,7 @@ class WebTest_Contact_SearchbyDateFilterTest extends CiviSeleniumTestCase {
   }
 
   /*
-   * Function to test individual pane seperatly.
+   * test individual pane seperatly.
    */
   function testAdvancedSearch() {
     $this->webtestLogin();
@@ -149,9 +153,12 @@ class WebTest_Contact_SearchbyDateFilterTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad(2 * $this->getTimeoutMsec());
   }
 
+  /**
+   * @param array $openedPanes
+   */
   function _checkOpenedPanes($openedPanes = array(
     )) {
-    if (!$this->isTextPresent('No matches found')) {
+    if (!$this->isTextPresent('None found.')) {
       $this->click('css=div.crm-advanced_search_form-accordion div.crm-accordion-header');
     }
 
@@ -168,6 +175,10 @@ class WebTest_Contact_SearchbyDateFilterTest extends CiviSeleniumTestCase {
     }
   }
 
+  /**
+   * @param $paneRef
+   * @param array $selectFields
+   */
   function _selectPaneFields($paneRef, $selectFields = array(
     )) {
     $pane = $this->_advanceSearchPanesDateFilter($paneRef);
@@ -214,6 +225,11 @@ class WebTest_Contact_SearchbyDateFilterTest extends CiviSeleniumTestCase {
     }
   }
 
+  /**
+   * @param null $paneRef
+   *
+   * @return array
+   */
   function _advanceSearchPanesDateFilter($paneRef = NULL) {
     static $_advance_search_panes;
 
@@ -329,7 +345,7 @@ class WebTest_Contact_SearchbyDateFilterTest extends CiviSeleniumTestCase {
         'event' =>
         array(
           'headerLocator' => 'div#CiviEvent',
-          'bodyLocator' => 'input#event_name',
+          'bodyLocator' => 'input#event_id',
           'title' => 'Events',
           'fields' =>
           array(