Merge remote-tracking branch 'upstream/4.5' into 4.5-4.6-2015-03-16-17-24-33
[civicrm-core.git] / tests / phpunit / CiviTest / Custom.php
index 0310b92e8893213297d4bfd74ba92d9cd9c1774a..73076f7a5d916d9e210cdee28df54d7505393221 100644 (file)
@@ -5,7 +5,7 @@
  */
 class Custom extends CiviUnitTestCase {
   /**
-   * Helper function to create Custom Group
+   * Helper function to create Custom Group.
    *
    * @deprecated - use functions on test case parent class
    *
@@ -13,9 +13,10 @@ class Custom extends CiviUnitTestCase {
    * @param null $extends
    * @param bool $isMultiple
    *
-   * @return object of created group
+   * @return object
+   *   of created group
    */
-  static function createGroup($group, $extends = NULL, $isMultiple = FALSE) {
+  public static function createGroup($group, $extends = NULL, $isMultiple = FALSE) {
     if (empty($group)) {
       if (isset($extends) &&
         !is_array($extends)
@@ -59,13 +60,14 @@ class Custom extends CiviUnitTestCase {
   }
 
   /**
-   * Helper function to create Custom Field
+   * Helper function to create Custom Field.
    * @deprecated use parent object create fn
    * @param array $params
    * @param null $fields
-   * @return object of created field
-*/
-  static function createField($params, $fields = NULL) {
+   * @return object
+   *   of created field
+   */
+  public static function createField($params, $fields = NULL) {
     if (empty($params)) {
       $params = array(
         'custom_group_id' => $fields['groupId'],
@@ -97,26 +99,29 @@ class Custom extends CiviUnitTestCase {
   }
 
   /**
-   * Helper function to delete custom field
+   * Helper function to delete custom field.
+   *
    * @deprecated use function on parent class
-   * @param  object of Custom Field to delete
+   *
+   * @param $params
    */
-  static function deleteField($params) {
-    require_once 'CRM/Core/BAO/CustomField.php';
+  public static function deleteField($params) {
     CRM_Core_BAO_CustomField::deleteField($params);
   }
 
   /**
-   * Helper function to delete custom group
+   * Helper function to delete custom group.
+   *
    * @deprecated use function on parent class
-   * @param  object Custom Group to delete
-   * @return boolean true if Group deleted, false otherwise
+   *
+   * @param $params
+   *
+   * @return bool
+   *   true if Group deleted, false otherwise
    */
-  static function deleteGroup($params) {
-    require_once 'CRM/Core/BAO/CustomGroup.php';
+  public static function deleteGroup($params) {
     $deleteCustomGroup = CRM_Core_BAO_CustomGroup::deleteGroup($params, TRUE);
     return $deleteCustomGroup;
   }
-}
-
 
+}