*
* (PHP 5)
*
- * @package CiviCRM
+ * @package CiviCRM
*
* This file is part of CiviCRM
*
/**
* 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__);
/**
* Test civicrm_activity_type_create()
*/
- function testActivityTypeCreate() {
-
+ public function testActivityTypeCreate() {
$params = array(
'weight' => '2',
'label' => 'send out letters',
/**
* Test civicrm_activity_type_create - check id
*/
- function testActivityTypecreatecheckId() {
-
+ public function testActivityTypecreatecheckId() {
$params = array(
'label' => 'type_create',
'weight' => '2',
/**
* Test civicrm_activity_type_delete()
*/
- function testActivityTypeDelete() {
-
+ public function testActivityTypeDelete() {
$params = array(
'label' => 'type_create_delete',
'weight' => '2',
$result = $this->callAPISuccess('activity_type', 'delete', $params, __FUNCTION__, __FILE__);
}
}
-