*/
/**
- * File for the CiviCRM APIv3 message_templates functions
+ * File for the CiviCRM APIv3 message_template functions
*
* @package CiviCRM_SEPA
*
/**
* @access public
*/
-function civicrm_api3_message_templates_create($params) {
+function civicrm_api3_message_template_create($params) {
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
* The metadata is used for setting defaults, documentation & validation
* @param array $params array or parameters determined by getfields
*/
-function _civicrm_api3_message_templates_create_spec(&$params) {
+function _civicrm_api3_message_template_create_spec(&$params) {
$params['msg_title']['api.required'] = 1;
$params['is_active']['api.default'] = true;
/* $params['entity_id']['api.required'] = 1;
* @param array $params
*
* @return boolean | error true if successfull, error otherwise
- * {@getfields message_templates_delete}
+ * {@getfields message_template_delete}
* @access public
*/
-function civicrm_api3_message_templates_delete($params) {
+function civicrm_api3_message_template_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
-function _civicrm_api3_message_templates_get_spec(&$params) {
+function _civicrm_api3_message_template_get_spec(&$params) {
}
/**
- * Retrieve one or more message_templatess
+ * Retrieve one or more message_template
*
* @param array input parameters
*
* @param array $params an associative array of name/value pairs.
*
* @return array api result array
- * {@getfields message_templates_get}
+ * {@getfields message_template_get}
* @access public
*/
-function civicrm_api3_message_templates_get($params) {
+function civicrm_api3_message_template_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
*
* @package CiviCRM_APIv3
*/
-class api_v3_MessageTemplatesTest extends CiviUnitTestCase {
+class api_v3_MessageTemplateTest extends CiviUnitTestCase {
/**
* Assume empty database with just civicrm_data
*/
- protected $entity = 'MessageTemplates';
+ protected $entity = 'MessageTemplate';
protected $params;
* test create function succeeds
*/
public function testCreate() {
- $result = $this->callAPIAndDocument('MessageTemplates', 'create', $this->params, __FUNCTION__, __FILE__);
+ $result = $this->callAPIAndDocument('MessageTemplate', 'create', $this->params, __FUNCTION__, __FILE__);
$this->getAndCheck($this->params, $result['id'], $this->entity);
}
*
*/
public function testGet() {
- $result = $this->callAPIAndDocument('MessageTemplates', 'get', $this->params, __FUNCTION__, __FILE__);
+ $result = $this->callAPIAndDocument('MessageTemplate', 'get', $this->params, __FUNCTION__, __FILE__);
$this->assertEquals(1, $result['count'], 'In line ' . __LINE__);
$this->assertNotNull($result['values'][$result['id']]['id'], 'In line ' . __LINE__);
}
*/
public function testDelete() {
$entity = $this->createTestEntity();
- $result = $this->callAPIAndDocument('MessageTemplates', 'delete', array('id' => $entity['id']), __FUNCTION__, __FILE__);
+ $result = $this->callAPIAndDocument('MessageTemplate', 'delete', array('id' => $entity['id']), __FUNCTION__, __FILE__);
$checkDeleted = $this->callAPISuccess($this->entity, 'get', array(
'id' => $entity['id']
));