From 0a972ab719f4f7c6ceb9957da534e001690ce1f9 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 11 Sep 2013 22:36:40 -0700 Subject: [PATCH] MessageTemplate - Update api/v3/examples --- ...latesCreate.php => MessageTemplateCreate.php} | 14 +++++++------- ...latesDelete.php => MessageTemplateDelete.php} | 10 +++++----- ...geTemplatesGet.php => MessageTemplateGet.php} | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) rename api/v3/examples/{MessageTemplatesCreate.php => MessageTemplateCreate.php} (85%) rename api/v3/examples/{MessageTemplatesDelete.php => MessageTemplateDelete.php} (82%) rename api/v3/examples/{MessageTemplatesGet.php => MessageTemplateGet.php} (84%) diff --git a/api/v3/examples/MessageTemplatesCreate.php b/api/v3/examples/MessageTemplateCreate.php similarity index 85% rename from api/v3/examples/MessageTemplatesCreate.php rename to api/v3/examples/MessageTemplateCreate.php index 55ac4025b9..d870a5b1f8 100644 --- a/api/v3/examples/MessageTemplatesCreate.php +++ b/api/v3/examples/MessageTemplateCreate.php @@ -1,22 +1,22 @@ 'msg_title_1', 'msg_subject' => 'msg_subject_1', 'msg_text' => 'msg_text_1', 'msg_html' => 'msg_html_1', 'workflow_id' => 1, - 'is_default' => '', + 'is_default' => '1', 'is_reserved' => 1, 'pdf_format_id' => '1', ); try{ - $result = civicrm_api3('message_templates', 'create', $params); + $result = civicrm_api3('message_template', 'create', $params); } catch (CiviCRM_API3_Exception $e) { // handle error here @@ -32,7 +32,7 @@ return $result; /** * Function returns array of result expected from previous function */ -function message_templates_create_expectedresult(){ +function message_template_create_expectedresult(){ $expectedResult = array( 'is_error' => 0, @@ -48,7 +48,7 @@ function message_templates_create_expectedresult(){ 'msg_html' => 'msg_html_1', 'is_active' => '1', 'workflow_id' => '1', - 'is_default' => '', + 'is_default' => '1', 'is_reserved' => '1', 'pdf_format_id' => '1', ), @@ -63,7 +63,7 @@ function message_templates_create_expectedresult(){ * This example has been generated from the API test suite. The test that created it is called * * testCreate and can be found in -* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/MessageTemplatesTest.php +* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/MessageTemplateTest.php * * You can see the outcome of the API tests at * http://tests.dev.civicrm.org/trunk/results-api_v3 diff --git a/api/v3/examples/MessageTemplatesDelete.php b/api/v3/examples/MessageTemplateDelete.php similarity index 82% rename from api/v3/examples/MessageTemplatesDelete.php rename to api/v3/examples/MessageTemplateDelete.php index 2bfe00470c..6bb981cc05 100644 --- a/api/v3/examples/MessageTemplatesDelete.php +++ b/api/v3/examples/MessageTemplateDelete.php @@ -1,15 +1,15 @@ 2, ); try{ - $result = civicrm_api3('message_templates', 'delete', $params); + $result = civicrm_api3('message_template', 'delete', $params); } catch (CiviCRM_API3_Exception $e) { // handle error here @@ -25,7 +25,7 @@ return $result; /** * Function returns array of result expected from previous function */ -function message_templates_delete_expectedresult(){ +function message_template_delete_expectedresult(){ $expectedResult = array( 'is_error' => 0, @@ -42,7 +42,7 @@ function message_templates_delete_expectedresult(){ * This example has been generated from the API test suite. The test that created it is called * * testDelete and can be found in -* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/MessageTemplatesTest.php +* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/MessageTemplateTest.php * * You can see the outcome of the API tests at * http://tests.dev.civicrm.org/trunk/results-api_v3 diff --git a/api/v3/examples/MessageTemplatesGet.php b/api/v3/examples/MessageTemplateGet.php similarity index 84% rename from api/v3/examples/MessageTemplatesGet.php rename to api/v3/examples/MessageTemplateGet.php index dcaa796afe..f238f69299 100644 --- a/api/v3/examples/MessageTemplatesGet.php +++ b/api/v3/examples/MessageTemplateGet.php @@ -1,22 +1,22 @@ 'msg_title_2', 'msg_subject' => 'msg_subject_2', 'msg_text' => 'msg_text_2', 'msg_html' => 'msg_html_2', 'workflow_id' => 2, - 'is_default' => '', + 'is_default' => '1', 'is_reserved' => 1, 'pdf_format_id' => '1', ); try{ - $result = civicrm_api3('message_templates', 'get', $params); + $result = civicrm_api3('message_template', 'get', $params); } catch (CiviCRM_API3_Exception $e) { // handle error here @@ -32,7 +32,7 @@ return $result; /** * Function returns array of result expected from previous function */ -function message_templates_get_expectedresult(){ +function message_template_get_expectedresult(){ $expectedResult = array( 'is_error' => 0, @@ -46,9 +46,9 @@ function message_templates_get_expectedresult(){ 'msg_subject' => 'msg_subject_2', 'msg_text' => 'msg_text_2', 'msg_html' => 'msg_html_2', - 'is_active' => 0, + 'is_active' => '1', 'workflow_id' => '2', - 'is_default' => 0, + 'is_default' => '1', 'is_reserved' => '1', 'pdf_format_id' => '1', ), @@ -63,7 +63,7 @@ function message_templates_get_expectedresult(){ * This example has been generated from the API test suite. The test that created it is called * * testGet and can be found in -* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/MessageTemplatesTest.php +* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/MessageTemplateTest.php * * You can see the outcome of the API tests at * http://tests.dev.civicrm.org/trunk/results-api_v3 -- 2.25.1