phpcs - Fix error, "Expected 1 newline at end of file; XXX found".
[civicrm-core.git] / tests / phpunit / WebTest / Import / CustomDataTest.php
index cd603ba4b27c52fcd1865d8e38c62b4d6c90ed9e..95b6a608c00d6c58c3eb5d607b2443e19e1585e7 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_Import_CustomDataTest extends ImportCiviSeleniumTestCase {
     parent::setUp();
   }
 
-  function testCustomDataImport() {
+  public function testCustomDataImport() {
     $this->webtestLogin();
 
     $firstName1       = 'Ma_' . substr(sha1(rand()), 0, 7);
@@ -102,19 +102,18 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase {
     }
   }
 
-  /*
-     *  Helper function to provide data for custom data import.
-     */
   /**
+   * Helper function to provide data for custom data import.
+   *
    * @param $customGroupTitle
-   * @param $firstName1
-   * @param $firstName2
+   * @param string $firstName1
+   * @param string $firstName2
    * @param $id1
    * @param $id2
    *
    * @return array
    */
-  function _individualCustomCSVData($customGroupTitle, $firstName1, $firstName2, $id1, $id2) {
+  public function _individualCustomCSVData($customGroupTitle, $firstName1, $firstName2, $id1, $id2) {
     list($customDataParams, $customDataVerify) = $this->_addCustomData($customGroupTitle, $id1, $id2);
 
     $headers = array(
@@ -156,7 +155,7 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase {
    *
    * @return array
    */
-  function _addCustomData($customGroupTitle, $id1, $id2) {
+  public function _addCustomData($customGroupTitle, $id1, $id2) {
 
     $this->openCiviPage("admin/custom/group", "reset=1");
 
@@ -323,20 +322,21 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase {
     $contactReferenceFieldId = $contactReferenceFieldId[1];
 
     $customDataParams = array(
-      'headers' =>
-      array(
+      'headers' => array(
         "custom_{$dateFieldId}" => "$dateFieldLabel :: $customGroupTitle",
         "custom_{$radioFieldId}" => "$radioFieldLabel :: $customGroupTitle",
         "custom_{$multiSelectFieldId}" => "$multiSelectLabel :: $customGroupTitle",
         "custom_{$contactReferenceFieldId}" => "$contactReferenceLabel :: $customGroupTitle",
       ),
-      'rows' =>
-      array(0 => array("custom_{$dateFieldId}" => date('Y-m-d'),
+      'rows' => array(
+        0 => array(
+          "custom_{$dateFieldId}" => date('Y-m-d'),
           "custom_{$radioFieldId}" => '2',
           "custom_{$multiSelectFieldId}" => '3',
           "custom_{$contactReferenceFieldId}" => $id1,
         ),
-        1 => array("custom_{$dateFieldId}" => date('Y-m-d', mktime(0, 0, 0, 4, 5, date('Y'))),
+        1 => array(
+          "custom_{$dateFieldId}" => date('Y-m-d', mktime(0, 0, 0, 4, 5, date('Y'))),
           "custom_{$radioFieldId}" => '1',
           "custom_{$multiSelectFieldId}" => '2',
           "custom_{$contactReferenceFieldId}" => $id2,
@@ -353,4 +353,3 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase {
     return array($customDataParams, $customDataVerify);
   }
 }
-