Coding standards cleanup sprint.
[civicrm-core.git] / tests / phpunit / api / v3 / GroupTest.php
index 6def8b7ff9ece8ff18a5ab6f095553d35a3d57af..0f2f859a9b5c98313ff3075493f877eccc7fd90f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -30,37 +30,25 @@ require_once 'CiviTest/CiviUnitTestCase.php';
 /**
  * Test class for Group API - civicrm_group_*
  *
- *  @package CiviCRM_APIv3
+ * @package CiviCRM_APIv3
  */
-
 class api_v3_GroupTest extends CiviUnitTestCase {
   protected $_apiversion;
   protected $_groupID;
 
-  /**
-   * @return array
-   */
-  function get_info() {
-    return array(
-      'name' => 'Group Get',
-      'description' => 'Test all Group Get API methods.',
-      'group' => 'CiviCRM API Tests',
-    );
-  }
-
-  function setUp() {
+  public function setUp() {
     $this->_apiversion = 3;
 
     parent::setUp();
     $this->_groupID = $this->groupCreate();
   }
 
-  function tearDown() {
+  public function tearDown() {
 
     $this->groupDelete($this->_groupID);
   }
 
-  function testgroupCreateNoTitle() {
+  public function testgroupCreateNoTitle() {
     $params = array(
       'name' => 'Test Group No title ',
       'domain_id' => 1,
@@ -77,7 +65,7 @@ class api_v3_GroupTest extends CiviUnitTestCase {
   }
 
 
-  function testGetGroupWithEmptyParams() {
+  public function testGetGroupWithEmptyParams() {
     $group = $this->callAPISuccess('group', 'get', $params = array());
 
     $group = $group["values"];
@@ -87,7 +75,7 @@ class api_v3_GroupTest extends CiviUnitTestCase {
     $this->assertEquals($group[$this->_groupID]['visibility'], 'Public Pages');
   }
 
-  function testGetGroupParamsWithGroupId() {
+  public function testGetGroupParamsWithGroupId() {
     $params = array('id' => $this->_groupID);
     $group = $this->callAPISuccess('group', 'get', $params);
 
@@ -100,7 +88,7 @@ class api_v3_GroupTest extends CiviUnitTestCase {
     }
   }
 
-  function testGetGroupParamsWithGroupName() {
+  public function testGetGroupParamsWithGroupName() {
     $params = array(
       'name' => "Test Group 1",
     );
@@ -116,7 +104,7 @@ class api_v3_GroupTest extends CiviUnitTestCase {
     }
   }
 
-  function testGetGroupParamsWithReturnName() {
+  public function testGetGroupParamsWithReturnName() {
     $params = array();
     $params['id'] = $this->_groupID;
     $params['return.name'] = 1;
@@ -126,7 +114,7 @@ class api_v3_GroupTest extends CiviUnitTestCase {
     );
   }
 
-  function testGetGroupParamsWithGroupTitle() {
+  public function testGetGroupParamsWithGroupTitle() {
     $params = array();
     $params['title'] = 'New Test Group Created';
     $group = $this->callAPISuccess('group', 'get', $params);
@@ -140,22 +128,21 @@ class api_v3_GroupTest extends CiviUnitTestCase {
     }
   }
 
-  function testGetNonExistingGroup() {
+  public function testGetNonExistingGroup() {
     $params = array();
     $params['title'] = 'No such group Exist';
     $group = $this->callAPISuccess('group', 'get', $params);
     $this->assertEquals(0, $group['count']);
   }
 
-  function testgroupdeleteParamsnoId() {
+  public function testgroupdeleteParamsnoId() {
     $group = $this->callAPIFailure('group', 'delete', array(), 'Mandatory key(s) missing from params array: id');
   }
 
-  function testgetfields() {
-    $description = "demonstrate use of getfields to interogate api";
+  public function testgetfields() {
+    $description = "demonstrate use of getfields to interrogate api";
     $params = array('action' => 'create');
     $result = $this->callAPIAndDocument('group', 'getfields', $params, __FUNCTION__, __FILE__, $description, 'getfields', 'getfields');
     $this->assertEquals(1, $result['values']['is_active']['api.default']);
   }
 }
-