Coding standards cleanup sprint.
[civicrm-core.git] / tests / phpunit / api / v3 / ActivityTypeTest.php
index 59d1d9054bb9883b8426470e6783daf77d57ada6..c6ec4a41d613759190528d40f406f8b7e9d8f4a2 100644 (file)
@@ -5,7 +5,7 @@
  *
  *  (PHP 5)
  *
- *   @package   CiviCRM
+ * @package   CiviCRM
  *
  *   This file is part of CiviCRM
  *
@@ -29,32 +29,23 @@ require_once 'CiviTest/CiviUnitTestCase.php';
 /**
  *  Test APIv3 civicrm_activity_* functions
  *
- *  @package CiviCRM_APIv3
- *  @subpackage API_Activity
+ * @package CiviCRM_APIv3
+ * @subpackage API_Activity
  */
-
 class api_v3_ActivityTypeTest extends CiviUnitTestCase {
   protected $_apiversion;
 
-
-  function get_info() {
-    return array(
-      'name' => 'Activity Type',
-      'description' => 'Test all ActivityType Get/Create/Delete methods.',
-      'group' => 'CiviCRM API Tests',
-    );
-  }
-
-  function setUp() {
+  public function setUp() {
     $this->_apiversion = 3;
     CRM_Core_PseudoConstant::activityType(TRUE, TRUE, TRUE, 'name');
     parent::setUp();
+    $this->useTransaction(TRUE);
   }
 
   /**
    *  Test civicrm_activity_type_get()
    */
-  function testActivityTypeGet() {
+  public function testActivityTypeGet() {
     $params = array();
     $result = $this->callAPIAndDocument('activity_type', 'get', $params, __FUNCTION__, __FILE__);
     $this->assertEquals($result['values']['1'], 'Meeting', 'In line ' . __LINE__);
@@ -64,8 +55,7 @@ class api_v3_ActivityTypeTest extends CiviUnitTestCase {
   /**
    *  Test civicrm_activity_type_create()
    */
-  function testActivityTypeCreate() {
-
+  public function testActivityTypeCreate() {
     $params = array(
       'weight' => '2',
       'label' => 'send out letters',
@@ -80,8 +70,7 @@ class api_v3_ActivityTypeTest extends CiviUnitTestCase {
   /**
    *  Test civicrm_activity_type_create - check id
    */
-  function testActivityTypecreatecheckId() {
-
+  public function testActivityTypecreatecheckId() {
     $params = array(
       'label' => 'type_create',
       'weight' => '2',
@@ -94,8 +83,7 @@ class api_v3_ActivityTypeTest extends CiviUnitTestCase {
   /**
    *  Test civicrm_activity_type_delete()
    */
-  function testActivityTypeDelete() {
-
+  public function testActivityTypeDelete() {
     $params = array(
       'label' => 'type_create_delete',
       'weight' => '2',
@@ -107,4 +95,3 @@ class api_v3_ActivityTypeTest extends CiviUnitTestCase {
     $result = $this->callAPISuccess('activity_type', 'delete', $params, __FUNCTION__, __FILE__);
   }
 }
-