From 53ca8fd7dc06f67447f5ea79a9f3c370dba10749 Mon Sep 17 00:00:00 2001 From: eileen Date: Sat, 22 Jun 2013 21:12:55 +1200 Subject: [PATCH] update test generated examples --- api/v3/examples/Contact/GetFieldsOptions.php | 17 +- api/v3/examples/ContactGetoptions.php | 7 +- .../ContributionCreateWithNote.php | 8 +- .../ContributionCreateWithSoftCredit.php | 10 +- .../CreateWithNestedLineItems.php | 50 +--- api/v3/examples/ContributionCreate.php | 8 +- api/v3/examples/ContributionDelete.php | 6 +- api/v3/examples/ContributionGet.php | 8 +- api/v3/examples/CustomGroupCreate.php | 13 +- api/v3/examples/CustomGroupDelete.php | 4 +- api/v3/examples/CustomGroupGet.php | 8 +- .../examples/CustomValue/formatFieldName.php | 14 +- api/v3/examples/CustomValueGet.php | 20 +- api/v3/examples/Email/NestedReplaceEmail.php | 42 ++- api/v3/examples/EmailCreate.php | 8 +- api/v3/examples/EmailDelete.php | 6 +- api/v3/examples/EmailReplace.php | 28 +- api/v3/examples/EntityTagCreate.php | 4 +- api/v3/examples/EntityTagDelete.php | 4 +- api/v3/examples/Event/IsCurrentOption.php | 21 +- api/v3/examples/Event/IsFullOption.php | 6 +- api/v3/examples/EventCreate.php | 10 +- api/v3/examples/EventDelete.php | 4 +- api/v3/examples/EventGet.php | 12 +- api/v3/examples/EventUpdate.php | 14 +- api/v3/examples/GrantCreate.php | 12 +- api/v3/examples/GrantDelete.php | 4 +- api/v3/examples/GrantGet.php | 20 +- api/v3/examples/Group/getfields.php | 51 ++-- .../examples/GroupContact/GetWithGroupID.php | 30 +-- api/v3/examples/GroupContactCreate.php | 4 +- api/v3/examples/GroupContactDelete.php | 4 +- api/v3/examples/GroupContactGet.php | 10 +- api/v3/examples/GroupGet.php | 24 +- api/v3/examples/GroupNestingCreate.php | 6 +- api/v3/examples/GroupNestingDelete.php | 4 +- api/v3/examples/GroupNestingGet.php | 8 +- api/v3/examples/GroupOrganizationCreate.php | 6 +- api/v3/examples/GroupOrganizationDelete.php | 4 +- api/v3/examples/GroupOrganizationGet.php | 4 +- api/v3/examples/ImCreate.php | 8 +- api/v3/examples/ImDelete.php | 6 +- api/v3/examples/ImGet.php | 8 +- api/v3/examples/JobCreate.php | 8 +- api/v3/examples/JobDelete.php | 4 +- api/v3/examples/LineItemCreate.php | 18 +- api/v3/examples/LineItemDelete.php | 4 +- api/v3/examples/LineItemGet.php | 8 +- api/v3/examples/LocBlockCreate.php | 6 +- api/v3/examples/LocBlockCreateEntities.php | 3 +- .../MailSettings/ChainedGetDelete.php | 14 +- api/v3/examples/MailSettingsCreate.php | 8 +- api/v3/examples/MailSettingsDelete.php | 4 +- api/v3/examples/MailSettingsGet.php | 8 +- api/v3/examples/MailingCreate.php | 22 +- api/v3/examples/MailingGroupSubscribe.php | 8 +- .../examples/Membership/filterIsCurrent.php | 20 +- api/v3/examples/MembershipCreate.php | 20 +- api/v3/examples/MembershipDelete.php | 4 +- api/v3/examples/MembershipGet.php | 16 +- api/v3/examples/MembershipPaymentCreate.php | 8 +- api/v3/examples/MembershipPaymentGet.php | 8 +- api/v3/examples/MembershipStatusCreate.php | 8 +- api/v3/examples/MembershipStatusGet.php | 8 +- api/v3/examples/MembershipTypeCreate.php | 11 +- api/v3/examples/MembershipTypeDelete.php | 4 +- api/v3/examples/MembershipTypeGet.php | 8 +- api/v3/examples/MembershipUpdate.php | 20 +- api/v3/examples/NoteCreate.php | 8 +- api/v3/examples/NoteDelete.php | 4 +- api/v3/examples/NoteGet.php | 8 +- api/v3/examples/OptionGroupCreate.php | 16 +- api/v3/examples/OptionGroupGet.php | 8 +- api/v3/examples/OptionValue/SortOption.php | 6 +- api/v3/examples/OptionValueGet.php | 16 +- .../Participant/CreateParticipantPayment.php | 22 +- api/v3/examples/Participant/NestedDelete.php | 14 +- .../examples/Participant/NestedEventGet.php | 16 +- api/v3/examples/ParticipantCreate.php | 8 +- api/v3/examples/ParticipantGet.php | 8 +- api/v3/examples/ParticipantPaymentCreate.php | 8 +- api/v3/examples/ParticipantPaymentDelete.php | 4 +- api/v3/examples/ParticipantPaymentGet.php | 18 +- .../examples/ParticipantStatusTypeCreate.php | 8 +- .../examples/ParticipantStatusTypeDelete.php | 4 +- api/v3/examples/ParticipantStatusTypeGet.php | 8 +- api/v3/examples/PaymentProcessorCreate.php | 8 +- api/v3/examples/PaymentProcessorDelete.php | 4 +- .../examples/PaymentProcessorTypeCreate.php | 8 +- .../examples/PaymentProcessorTypeDelete.php | 4 +- api/v3/examples/PhoneCreate.php | 11 +- api/v3/examples/PhoneDelete.php | 7 +- api/v3/examples/PhoneGet.php | 11 +- api/v3/examples/Pledge/GetFilterHighDate.php | 12 +- api/v3/examples/PledgeCreate.php | 18 +- api/v3/examples/PledgeDelete.php | 6 +- api/v3/examples/PledgeGet.php | 12 +- api/v3/examples/PledgePaymentCreate.php | 8 +- api/v3/examples/PledgePaymentDelete.php | 6 +- api/v3/examples/PledgePaymentGet.php | 26 +- api/v3/examples/PledgePaymentUpdate.php | 10 +- api/v3/examples/PriceFieldCreate.php | 8 +- api/v3/examples/PriceFieldDelete.php | 4 +- api/v3/examples/PriceFieldGet.php | 8 +- api/v3/examples/PriceFieldValueCreate.php | 9 +- api/v3/examples/PriceFieldValueDelete.php | 4 +- api/v3/examples/PriceFieldValueGet.php | 8 +- api/v3/examples/PriceSetCreate.php | 8 +- api/v3/examples/PriceSetDelete.php | 4 +- api/v3/examples/PriceSetGet.php | 8 +- api/v3/examples/PriceSetSet.php | 8 +- api/v3/examples/ProfileApply.php | 18 +- api/v3/examples/ProfileGet.php | 6 +- api/v3/examples/ProfileSet.php | 16 +- api/v3/examples/RelationshipTypeCreate.php | 8 +- api/v3/examples/RelationshipTypeDelete.php | 4 +- api/v3/examples/Setting/CreateAllDomains.php | 12 +- .../Setting/CreateSettingCurrentDomain.php | 8 +- .../Setting/CreateSpecifiedDomains.php | 12 +- api/v3/examples/Setting/GetAllDomains.php | 12 +- api/v3/examples/Setting/GetDefaults.php | 8 +- .../Setting/GetSettingCurrentDomain.php | 8 +- .../examples/Setting/GetSpecifiedDomains.php | 14 +- api/v3/examples/SettingCreate.php | 8 +- api/v3/examples/SettingGet.php | 8 +- api/v3/examples/SettingGetValue.php | 2 +- api/v3/examples/SettingGetfields.php | 250 ++++++++++-------- api/v3/examples/SettingRevert.php | 10 +- api/v3/examples/Survey/ChainedGetDelete.php | 4 - api/v3/examples/SurveyCreate.php | 8 - api/v3/examples/SurveyGet.php | 6 - 131 files changed, 795 insertions(+), 826 deletions(-) diff --git a/api/v3/examples/Contact/GetFieldsOptions.php b/api/v3/examples/Contact/GetFieldsOptions.php index 425ebed3ab..fac0bae4e7 100644 --- a/api/v3/examples/Contact/GetFieldsOptions.php +++ b/api/v3/examples/Contact/GetFieldsOptions.php @@ -1,7 +1,7 @@ true, 'default' => 'Both', 'enumValues' => 'Text, HTML, Both', - 'options' => array( - '0' => 'Text', - '1' => 'HTML', - '2' => 'Both', - ), ), 'hash' => array( 'name' => 'hash', @@ -317,9 +312,6 @@ function contact_getfields_expectedresult(){ 'pseudoconstant' => array( 'optionGroupName' => 'individual_prefix', ), - 'api.aliases' => array( - '0' => 'prefix', - ), ), 'suffix_id' => array( 'name' => 'suffix_id', @@ -333,9 +325,6 @@ function contact_getfields_expectedresult(){ 'pseudoconstant' => array( 'optionGroupName' => 'individual_suffix', ), - 'api.aliases' => array( - '0' => 'suffix', - ), ), 'email_greeting_id' => array( 'name' => 'email_greeting_id', @@ -423,9 +412,6 @@ function contact_getfields_expectedresult(){ 'pseudoconstant' => array( 'optionGroupName' => 'gender', ), - 'api.aliases' => array( - '0' => 'gender', - ), ), 'birth_date' => array( 'name' => 'birth_date', @@ -570,6 +556,7 @@ function contact_getfields_expectedresult(){ 'option_group_id' => '97', 'date_format' => '', 'time_format' => '', + 'name' => 'custom_1', 'options' => array( '1' => 'Label1', '2' => 'Label2', diff --git a/api/v3/examples/ContactGetoptions.php b/api/v3/examples/ContactGetoptions.php index 2195ad9755..12f2272acf 100644 --- a/api/v3/examples/ContactGetoptions.php +++ b/api/v3/examples/ContactGetoptions.php @@ -22,13 +22,8 @@ function contact_getoptions_expectedresult(){ $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 3, + 'count' => 2, 'values' => array( - 'attributes' => array( - 'label' => 'Country', - 'data_type' => 'String', - 'html_type' => 'Select', - ), '1' => 'Label1', '2' => 'Label2', ), diff --git a/api/v3/examples/Contribution/ContributionCreateWithNote.php b/api/v3/examples/Contribution/ContributionCreateWithNote.php index 7c21314c06..95cf55adc7 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithNote.php +++ b/api/v3/examples/Contribution/ContributionCreateWithNote.php @@ -4,7 +4,7 @@ Demonstrates creating contribution with Note Entity */ function contribution_create_example(){ -$params = array( +$params = array( 'contact_id' => 1, 'receive_date' => '2012-01-01', 'total_amount' => '100', @@ -31,13 +31,13 @@ $params = array( */ function contribution_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '1', 'financial_type_id' => '1', diff --git a/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php b/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php index 8270f673f9..7dda9bfe72 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php +++ b/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php @@ -4,8 +4,8 @@ Demonstrates creating contribution with SoftCredit */ function contribution_create_example(){ -$params = array( - 'contact_id' => 3, +$params = array( + 'contact_id' => 1, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -28,13 +28,13 @@ $params = array( */ function contribution_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '1', 'financial_type_id' => '1', diff --git a/api/v3/examples/Contribution/CreateWithNestedLineItems.php b/api/v3/examples/Contribution/CreateWithNestedLineItems.php index fb113f584c..fdd56d5083 100644 --- a/api/v3/examples/Contribution/CreateWithNestedLineItems.php +++ b/api/v3/examples/Contribution/CreateWithNestedLineItems.php @@ -4,7 +4,7 @@ Create Contribution with Nested Line Items */ function contribution_create_example(){ -$params = array( +$params = array( 'contact_id' => 1, 'receive_date' => '20120511', 'total_amount' => '100', @@ -19,14 +19,14 @@ $params = array( 'contribution_status_id' => 1, 'version' => 3, 'skipLineItem' => 1, - 'api.line_item.create' => array( - '0' => array( + 'api.line_item.create' => array( + '0' => array( 'price_field_id' => 1, 'qty' => 2, 'line_total' => '20', 'unit_price' => '10', ), - '1' => array( + '1' => array( 'price_field_id' => 1, 'qty' => 1, 'line_total' => '80', @@ -45,13 +45,13 @@ $params = array( */ function contribution_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '1', 'financial_type_id' => '1', @@ -81,25 +81,14 @@ function contribution_create_expectedresult(){ 'check_number' => 'null', 'campaign_id' => '', 'contribution_type_id' => '1', - 'api.line_item.create' => array( - '0' => array( + 'api.line_item.create' => array( + '0' => array( 'is_error' => 0, - 'undefined_fields' => array( - '0' => 'label', - '1' => 'entity_id', - '2' => 'entity_table', - '3' => 'contribution_id', - '4' => 'api.has_parent', - '5' => 'price_field_id', - '6' => 'qty', - '7' => 'line_total', - '8' => 'unit_price', - ), 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'entity_table' => 'civicrm_contribution', 'entity_id' => '1', @@ -115,24 +104,13 @@ function contribution_create_expectedresult(){ ), ), ), - '1' => array( + '1' => array( 'is_error' => 0, - 'undefined_fields' => array( - '0' => 'label', - '1' => 'entity_id', - '2' => 'entity_table', - '3' => 'contribution_id', - '4' => 'api.has_parent', - '5' => 'price_field_id', - '6' => 'qty', - '7' => 'line_total', - '8' => 'unit_price', - ), 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '2', 'entity_table' => 'civicrm_contribution', 'entity_id' => '1', diff --git a/api/v3/examples/ContributionCreate.php b/api/v3/examples/ContributionCreate.php index ffee561079..5eece67eae 100644 --- a/api/v3/examples/ContributionCreate.php +++ b/api/v3/examples/ContributionCreate.php @@ -4,7 +4,7 @@ */ function contribution_create_example(){ -$params = array( +$params = array( 'contact_id' => 1, 'receive_date' => '20120511', 'total_amount' => '100', @@ -27,13 +27,13 @@ $params = array( */ function contribution_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '1', 'financial_type_id' => '1', diff --git a/api/v3/examples/ContributionDelete.php b/api/v3/examples/ContributionDelete.php index c34c2b84fb..76bcf2e3e1 100644 --- a/api/v3/examples/ContributionDelete.php +++ b/api/v3/examples/ContributionDelete.php @@ -4,7 +4,7 @@ */ function contribution_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,12 +19,12 @@ $params = array( */ function contribution_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( + 'values' => array( '1' => 1, ), ); diff --git a/api/v3/examples/ContributionGet.php b/api/v3/examples/ContributionGet.php index bdccc15aef..4871684b0a 100644 --- a/api/v3/examples/ContributionGet.php +++ b/api/v3/examples/ContributionGet.php @@ -4,7 +4,7 @@ */ function contribution_get_example(){ -$params = array( +$params = array( 'contribution_id' => 1, 'version' => 3, ); @@ -19,13 +19,13 @@ $params = array( */ function contribution_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', diff --git a/api/v3/examples/CustomGroupCreate.php b/api/v3/examples/CustomGroupCreate.php index 1622e094a4..c03dd48761 100644 --- a/api/v3/examples/CustomGroupCreate.php +++ b/api/v3/examples/CustomGroupCreate.php @@ -4,10 +4,10 @@ */ function custom_group_create_example(){ -$params = array( +$params = array( 'title' => 'Test_Group_1', 'name' => 'test_group_1', - 'extends' => array( + 'extends' => array( '0' => 'Individual', ), 'weight' => 4, @@ -29,13 +29,13 @@ $params = array( */ function custom_group_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'name' => 'test_group_1', 'title' => 'Test_Group_1', @@ -54,7 +54,8 @@ function custom_group_create_expectedresult(){ 'max_multiple' => 'null', 'collapse_adv_display' => '', 'created_id' => '', - 'created_date' => '', + 'created_date' => '20120130621222105', + 'is_reserved' => '', ), ), ); diff --git a/api/v3/examples/CustomGroupDelete.php b/api/v3/examples/CustomGroupDelete.php index 8501d1fd8b..0c2d0aefe7 100644 --- a/api/v3/examples/CustomGroupDelete.php +++ b/api/v3/examples/CustomGroupDelete.php @@ -4,7 +4,7 @@ */ function custom_group_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function custom_group_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/CustomGroupGet.php b/api/v3/examples/CustomGroupGet.php index 2cde50cefc..6195030bca 100644 --- a/api/v3/examples/CustomGroupGet.php +++ b/api/v3/examples/CustomGroupGet.php @@ -4,7 +4,7 @@ */ function custom_group_get_example(){ -$params = array( +$params = array( 'version' => 3, ); @@ -18,13 +18,13 @@ $params = array( */ function custom_group_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'name' => 'test_group_1', 'title' => 'Test_Group_1', diff --git a/api/v3/examples/CustomValue/formatFieldName.php b/api/v3/examples/CustomValue/formatFieldName.php index 9c1c271e47..3279ad8db1 100644 --- a/api/v3/examples/CustomValue/formatFieldName.php +++ b/api/v3/examples/CustomValue/formatFieldName.php @@ -4,7 +4,7 @@ utilises field names */ function custom_value_get_example(){ -$params = array( +$params = array( 'id' => 2, 'version' => 3, 'entity_id' => 2, @@ -21,32 +21,32 @@ $params = array( */ function custom_value_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 4, - 'values' => array( - 'mySingleField' => array( + 'values' => array( + 'mySingleField' => array( 'entity_id' => '2', 'latest' => 'value 1', 'id' => 'mySingleField', '0' => 'value 1', ), - 'Cust_Field' => array( + 'Cust_Field' => array( 'entity_id' => '2', 'latest' => 'coffee', 'id' => 'Cust_Field', '1' => '', '2' => 'coffee', ), - 'field_2' => array( + 'field_2' => array( 'entity_id' => '2', 'latest' => 'value 4', 'id' => 'field_2', '1' => '', '2' => 'value 4', ), - 'field_3' => array( + 'field_3' => array( 'entity_id' => '2', 'latest' => '', 'id' => 'field_3', diff --git a/api/v3/examples/CustomValueGet.php b/api/v3/examples/CustomValueGet.php index f2c975e7c7..80cb01fcc1 100644 --- a/api/v3/examples/CustomValueGet.php +++ b/api/v3/examples/CustomValueGet.php @@ -4,7 +4,7 @@ /*this demonstrates the use of CustomValue get */ function custom_value_get_example(){ -$params = array( +$params = array( 'id' => 2, 'version' => 3, 'entity_id' => 2, @@ -20,53 +20,53 @@ $params = array( */ function custom_value_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 7, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'entity_id' => '2', 'latest' => 'value 1', 'id' => '1', '0' => 'value 1', ), - '2' => array( + '2' => array( 'entity_id' => '2', 'latest' => 'value 3', 'id' => '2', '1' => 'value 2', '2' => 'value 3', ), - '3' => array( + '3' => array( 'entity_id' => '2', 'latest' => '', 'id' => '3', '1' => 'warm beer', '2' => '', ), - '4' => array( + '4' => array( 'entity_id' => '2', 'latest' => '', 'id' => '4', '1' => 'fl* w*', '2' => '', ), - '5' => array( + '5' => array( 'entity_id' => '2', 'latest' => 'coffee', 'id' => '5', '1' => '', '2' => 'coffee', ), - '6' => array( + '6' => array( 'entity_id' => '2', 'latest' => 'value 4', 'id' => '6', '1' => '', '2' => 'value 4', ), - '7' => array( + '7' => array( 'entity_id' => '2', 'latest' => '', 'id' => '7', diff --git a/api/v3/examples/Email/NestedReplaceEmail.php b/api/v3/examples/Email/NestedReplaceEmail.php index 78c6a8a138..9a0a46eab3 100644 --- a/api/v3/examples/Email/NestedReplaceEmail.php +++ b/api/v3/examples/Email/NestedReplaceEmail.php @@ -4,32 +4,32 @@ example demonstrates use of Replace in a nested API call */ function email_replace_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 10, - 'api.email.replace' => array( - 'values' => array( - '0' => array( + 'api.email.replace' => array( + 'values' => array( + '0' => array( 'location_type_id' => 20, 'email' => '1-1@example.com', 'is_primary' => 1, ), - '1' => array( + '1' => array( 'location_type_id' => 20, 'email' => '1-2@example.com', 'is_primary' => 0, ), - '2' => array( + '2' => array( 'location_type_id' => 20, 'email' => '1-3@example.com', 'is_primary' => 0, ), - '3' => array( + '3' => array( 'location_type_id' => 21, 'email' => '2-1@example.com', 'is_primary' => 0, ), - '4' => array( + '4' => array( 'location_type_id' => 21, 'email' => '2-2@example.com', 'is_primary' => 0, @@ -48,13 +48,13 @@ $params = array( */ function email_replace_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 10, - 'values' => array( - '10' => array( + 'values' => array( + '10' => array( 'contact_id' => '10', 'contact_type' => 'Organization', 'contact_sub_type' => '', @@ -83,12 +83,6 @@ function email_replace_expectedresult(){ 'organization_name' => 'Unit Test Organization', 'sic_code' => '', 'contact_is_deleted' => 0, - 'gender_id' => '', - 'gender' => '', - 'prefix_id' => '', - 'prefix' => '', - 'suffix_id' => '', - 'suffix' => '', 'current_employer' => '', 'address_id' => '', 'street_address' => '', @@ -116,12 +110,12 @@ function email_replace_expectedresult(){ 'worldregion_id' => '', 'world_region' => '', 'id' => '10', - 'api.email.replace' => array( + 'api.email.replace' => array( 'is_error' => 0, 'version' => 3, 'count' => 5, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '18', 'contact_id' => '10', 'location_type_id' => '20', @@ -135,7 +129,7 @@ function email_replace_expectedresult(){ 'signature_text' => '', 'signature_html' => '', ), - '1' => array( + '1' => array( 'id' => '19', 'contact_id' => '10', 'location_type_id' => '20', @@ -149,7 +143,7 @@ function email_replace_expectedresult(){ 'signature_text' => '', 'signature_html' => '', ), - '2' => array( + '2' => array( 'id' => '20', 'contact_id' => '10', 'location_type_id' => '20', @@ -163,7 +157,7 @@ function email_replace_expectedresult(){ 'signature_text' => '', 'signature_html' => '', ), - '3' => array( + '3' => array( 'id' => '21', 'contact_id' => '10', 'location_type_id' => '21', @@ -177,7 +171,7 @@ function email_replace_expectedresult(){ 'signature_text' => '', 'signature_html' => '', ), - '4' => array( + '4' => array( 'id' => '22', 'contact_id' => '10', 'location_type_id' => '21', diff --git a/api/v3/examples/EmailCreate.php b/api/v3/examples/EmailCreate.php index 55ae4c06ea..dedf7bfc91 100644 --- a/api/v3/examples/EmailCreate.php +++ b/api/v3/examples/EmailCreate.php @@ -4,7 +4,7 @@ */ function email_create_example(){ -$params = array( +$params = array( 'contact_id' => 3, 'location_type_id' => 6, 'email' => 'api@a-team.com', @@ -22,13 +22,13 @@ $params = array( */ function email_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 3, - 'values' => array( - '3' => array( + 'values' => array( + '3' => array( 'id' => '3', 'contact_id' => '3', 'location_type_id' => '6', diff --git a/api/v3/examples/EmailDelete.php b/api/v3/examples/EmailDelete.php index 9d59c97de7..40bf993c6e 100644 --- a/api/v3/examples/EmailDelete.php +++ b/api/v3/examples/EmailDelete.php @@ -4,7 +4,7 @@ */ function email_delete_example(){ -$params = array( +$params = array( 'contact_id' => 8, 'location_type_id' => 16, 'email' => 'api@a-team.com', @@ -22,11 +22,11 @@ $params = array( */ function email_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => 1, + 'values' => true, ); return $expectedResult ; diff --git a/api/v3/examples/EmailReplace.php b/api/v3/examples/EmailReplace.php index b5b15e493d..f6a6c4cdb8 100644 --- a/api/v3/examples/EmailReplace.php +++ b/api/v3/examples/EmailReplace.php @@ -4,31 +4,31 @@ */ function email_replace_example(){ -$params = array( +$params = array( 'version' => 3, 'contact_id' => 9, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'location_type_id' => 18, 'email' => '1-1@example.com', 'is_primary' => 1, ), - '1' => array( + '1' => array( 'location_type_id' => 18, 'email' => '1-2@example.com', 'is_primary' => 0, ), - '2' => array( + '2' => array( 'location_type_id' => 18, 'email' => '1-3@example.com', 'is_primary' => 0, ), - '3' => array( + '3' => array( 'location_type_id' => 19, 'email' => '2-1@example.com', 'is_primary' => 0, ), - '4' => array( + '4' => array( 'location_type_id' => 19, 'email' => '2-2@example.com', 'is_primary' => 0, @@ -46,12 +46,12 @@ $params = array( */ function email_replace_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 5, - 'values' => array( - '12' => array( + 'values' => array( + '12' => array( 'id' => '12', 'contact_id' => '9', 'location_type_id' => '18', @@ -65,7 +65,7 @@ function email_replace_expectedresult(){ 'signature_text' => '', 'signature_html' => '', ), - '13' => array( + '13' => array( 'id' => '13', 'contact_id' => '9', 'location_type_id' => '18', @@ -79,7 +79,7 @@ function email_replace_expectedresult(){ 'signature_text' => '', 'signature_html' => '', ), - '14' => array( + '14' => array( 'id' => '14', 'contact_id' => '9', 'location_type_id' => '18', @@ -93,7 +93,7 @@ function email_replace_expectedresult(){ 'signature_text' => '', 'signature_html' => '', ), - '15' => array( + '15' => array( 'id' => '15', 'contact_id' => '9', 'location_type_id' => '19', @@ -107,7 +107,7 @@ function email_replace_expectedresult(){ 'signature_text' => '', 'signature_html' => '', ), - '16' => array( + '16' => array( 'id' => '16', 'contact_id' => '9', 'location_type_id' => '19', diff --git a/api/v3/examples/EntityTagCreate.php b/api/v3/examples/EntityTagCreate.php index 0c924368bb..9eda49f51d 100644 --- a/api/v3/examples/EntityTagCreate.php +++ b/api/v3/examples/EntityTagCreate.php @@ -4,7 +4,7 @@ */ function entity_tag_create_example(){ -$params = array( +$params = array( 'contact_id' => 12, 'tag_id' => 1, 'version' => 3, @@ -20,7 +20,7 @@ $params = array( */ function entity_tag_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'not_added' => 0, 'added' => 1, diff --git a/api/v3/examples/EntityTagDelete.php b/api/v3/examples/EntityTagDelete.php index be5f854043..1315022fb3 100644 --- a/api/v3/examples/EntityTagDelete.php +++ b/api/v3/examples/EntityTagDelete.php @@ -4,7 +4,7 @@ */ function entity_tag_delete_example(){ -$params = array( +$params = array( 'contact_id_h' => 46, 'tag_id' => 1, 'version' => 3, @@ -20,7 +20,7 @@ $params = array( */ function entity_tag_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'not_removed' => 0, 'removed' => 1, diff --git a/api/v3/examples/Event/IsCurrentOption.php b/api/v3/examples/Event/IsCurrentOption.php index 12c4cb8d37..1e4acedb90 100644 --- a/api/v3/examples/Event/IsCurrentOption.php +++ b/api/v3/examples/Event/IsCurrentOption.php @@ -4,9 +4,10 @@ demonstrates use of is.Current option */ function event_get_example(){ -$params = array( - 'version' => 3, +$params = array( 'isCurrent' => 1, + 'version' => 3, + 'debug' => 0, ); $result = civicrm_api( 'event','get',$params ); @@ -19,13 +20,13 @@ $params = array( */ function event_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 3, - 'values' => array( - '3' => array( + 'values' => array( + '3' => array( 'id' => '3', 'title' => 'Annual CiviCRM meet 2', 'event_title' => 'Annual CiviCRM meet 2', @@ -35,10 +36,10 @@ function event_get_expectedresult(){ 'event_type_id' => '1', 'participant_listing_id' => 0, 'is_public' => '1', - 'start_date' => '2013-02-05 00:00:00', - 'event_start_date' => '2013-02-05 00:00:00', - 'end_date' => '2013-02-11 00:00:00', - 'event_end_date' => '2013-02-11 00:00:00', + 'start_date' => '2013-06-23 00:00:00', + 'event_start_date' => '2013-06-23 00:00:00', + 'end_date' => '2013-06-29 00:00:00', + 'event_end_date' => '2013-06-29 00:00:00', 'is_online_registration' => '1', 'registration_start_date' => '2010-06-01 00:00:00', 'registration_end_date' => '2010-10-15 00:00:00', @@ -55,7 +56,7 @@ function event_get_expectedresult(){ 'is_multiple_registrations' => 0, 'allow_same_participant_emails' => 0, 'is_template' => 0, - 'created_date' => '2013-02-04 22:31:23', + 'created_date' => '20120130621222105', 'is_share' => '1', ), ), diff --git a/api/v3/examples/Event/IsFullOption.php b/api/v3/examples/Event/IsFullOption.php index f45d08f40a..3cb158cb0a 100644 --- a/api/v3/examples/Event/IsFullOption.php +++ b/api/v3/examples/Event/IsFullOption.php @@ -4,7 +4,7 @@ demonstrates use of return is_full */ function event_getsingle_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, 'return.is_full' => 1, @@ -20,7 +20,7 @@ $params = array( */ function event_getsingle_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'id' => '1', 'title' => 'Annual CiviCRM meet', 'event_title' => 'Annual CiviCRM meet', @@ -42,7 +42,7 @@ function event_getsingle_expectedresult(){ 'is_multiple_registrations' => 0, 'allow_same_participant_emails' => 0, 'is_template' => 0, - 'created_date' => '2013-02-04 22:31:24', + 'created_date' => '2013-06-22 08:49:03', 'is_share' => '1', 'available_places' => 0, 'is_full' => '1', diff --git a/api/v3/examples/EventCreate.php b/api/v3/examples/EventCreate.php index b5f3b67e96..1c04b164e6 100644 --- a/api/v3/examples/EventCreate.php +++ b/api/v3/examples/EventCreate.php @@ -4,7 +4,7 @@ */ function event_create_example(){ -$params = array( +$params = array( 'title' => 'Annual CiviCRM meet', 'summary' => 'If you have any CiviCRM realted issues or want to track where CiviCRM is heading, Sign up now', 'description' => 'This event is intended to give brief idea about progess of CiviCRM and giving solutions to common user issues', @@ -33,13 +33,13 @@ $params = array( */ function event_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 3, - 'values' => array( - '3' => array( + 'values' => array( + '3' => array( 'id' => '3', 'title' => 'Annual CiviCRM meet', 'summary' => 'If you have any CiviCRM realted issues or want to track where CiviCRM is heading, Sign up now', @@ -97,7 +97,7 @@ function event_create_expectedresult(){ 'is_template' => 0, 'template_title' => '', 'created_id' => '', - 'created_date' => '20130204223127', + 'created_date' => '20120130621222105', 'currency' => '', 'campaign_id' => '', 'is_share' => '', diff --git a/api/v3/examples/EventDelete.php b/api/v3/examples/EventDelete.php index af46062c43..75d5b0e2b6 100644 --- a/api/v3/examples/EventDelete.php +++ b/api/v3/examples/EventDelete.php @@ -4,7 +4,7 @@ */ function event_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function event_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/EventGet.php b/api/v3/examples/EventGet.php index 241c72911b..7174320716 100644 --- a/api/v3/examples/EventGet.php +++ b/api/v3/examples/EventGet.php @@ -4,9 +4,11 @@ */ function event_get_example(){ -$params = array( +$params = array( 'event_title' => 'Annual CiviCRM meet', + 'sequential' => true, 'version' => 3, + 'debug' => 0, ); $result = civicrm_api( 'event','get',$params ); @@ -19,13 +21,13 @@ $params = array( */ function event_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '0' => array( 'id' => '1', 'title' => 'Annual CiviCRM meet', 'event_title' => 'Annual CiviCRM meet', @@ -46,7 +48,7 @@ function event_get_expectedresult(){ 'is_multiple_registrations' => 0, 'allow_same_participant_emails' => 0, 'is_template' => 0, - 'created_date' => '2013-02-04 22:31:22', + 'created_date' => '20120130621222105', 'is_share' => '1', ), ), diff --git a/api/v3/examples/EventUpdate.php b/api/v3/examples/EventUpdate.php index f951119da3..64b46e3e1e 100644 --- a/api/v3/examples/EventUpdate.php +++ b/api/v3/examples/EventUpdate.php @@ -4,8 +4,8 @@ */ function event_update_example(){ -$params = array( - '0' => array( +$params = array( + '0' => array( 'title' => 'Annual CiviCRM meet', 'summary' => 'If you have any CiviCRM realted issues or want to track where CiviCRM is heading, Sign up now', 'description' => 'This event is intended to give brief idea about progess of CiviCRM and giving solutions to common user issues', @@ -23,7 +23,7 @@ $params = array( 'is_show_location' => 0, 'version' => 3, ), - '1' => array( + '1' => array( 'title' => 'Annual CiviCRM meet 2', 'summary' => 'If you have any CiviCRM realted issues or want to track where CiviCRM is heading, Sign up now', 'description' => 'This event is intended to give brief idea about progess of CiviCRM and giving solutions to common user issues', @@ -53,13 +53,13 @@ $params = array( */ function event_update_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 3, - 'values' => array( - '3' => array( + 'values' => array( + '3' => array( 'id' => '3', 'title' => 'Annual CiviCRM meet 2', 'event_title' => 'Annual CiviCRM meet 2', @@ -89,7 +89,7 @@ function event_update_expectedresult(){ 'is_multiple_registrations' => 0, 'allow_same_participant_emails' => 0, 'is_template' => 0, - 'created_date' => '2013-02-04 22:31:28', + 'created_date' => '20120130621222105', 'is_share' => '1', ), ), diff --git a/api/v3/examples/GrantCreate.php b/api/v3/examples/GrantCreate.php index 0e025d5640..5053fe603f 100644 --- a/api/v3/examples/GrantCreate.php +++ b/api/v3/examples/GrantCreate.php @@ -4,7 +4,7 @@ */ function grant_create_example(){ -$params = array( +$params = array( 'version' => 3, 'contact_id' => 3, 'application_received_date' => 'now', @@ -26,17 +26,17 @@ $params = array( */ function grant_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '3', - 'application_received_date' => '20130204223148', - 'decision_date' => '20130211000000', + 'application_received_date' => '20130622084947', + 'decision_date' => '20130624000000', 'money_transfer_date' => '', 'grant_due_date' => '', 'grant_report_received' => '', diff --git a/api/v3/examples/GrantDelete.php b/api/v3/examples/GrantDelete.php index 9b597c5fe0..92b6487a60 100644 --- a/api/v3/examples/GrantDelete.php +++ b/api/v3/examples/GrantDelete.php @@ -4,7 +4,7 @@ */ function grant_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'contact_id' => 5, 'application_received_date' => 'now', @@ -26,7 +26,7 @@ $params = array( */ function grant_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/GrantGet.php b/api/v3/examples/GrantGet.php index e20f62ff0a..9a90bb4f61 100644 --- a/api/v3/examples/GrantGet.php +++ b/api/v3/examples/GrantGet.php @@ -4,9 +4,9 @@ */ function grant_get_example(){ -$params = array( +$params = array( 'version' => 3, - 'contact_id' => 3, + 'contact_id' => 4, 'application_received_date' => 'now', 'decision_date' => 'next Monday', 'amount_total' => '500', @@ -26,17 +26,17 @@ $params = array( */ function grant_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, - 'values' => array( - '1' => array( - 'id' => '1', - 'contact_id' => '3', - 'application_received_date' => '2013-05-14', - 'decision_date' => '2013-05-20', + 'id' => 2, + 'values' => array( + '2' => array( + 'id' => '2', + 'contact_id' => '4', + 'application_received_date' => '2013-06-22', + 'decision_date' => '2013-06-24', 'grant_type_id' => '1', 'amount_total' => '500.00', 'currency' => 'USD', diff --git a/api/v3/examples/Group/getfields.php b/api/v3/examples/Group/getfields.php index 8b44f895c5..42375a5015 100644 --- a/api/v3/examples/Group/getfields.php +++ b/api/v3/examples/Group/getfields.php @@ -4,7 +4,7 @@ demonstrate use of getfields to interogate api */ function group_getfields_example(){ -$params = array( +$params = array( 'version' => 3, 'action' => 'create', ); @@ -19,25 +19,28 @@ $params = array( */ function group_getfields_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 19, - 'values' => array( - 'id' => array( + 'values' => array( + 'id' => array( 'name' => 'id', 'type' => 1, 'title' => 'Group ID', 'required' => true, + 'api.aliases' => array( + '0' => 'group_id', + ), ), - 'name' => array( + 'name' => array( 'name' => 'name', 'type' => 2, 'title' => 'Group Name', 'maxlength' => 64, 'size' => 30, ), - 'title' => array( + 'title' => array( 'name' => 'title', 'type' => 2, 'title' => 'Group Title', @@ -45,96 +48,92 @@ function group_getfields_expectedresult(){ 'size' => 30, 'api.required' => 1, ), - 'description' => array( + 'description' => array( 'name' => 'description', 'type' => 32, 'title' => 'Group Description', 'rows' => 2, 'cols' => 60, ), - 'source' => array( + 'source' => array( 'name' => 'source', 'type' => 2, 'title' => 'Group Source', 'maxlength' => 64, 'size' => 30, ), - 'saved_search_id' => array( + 'saved_search_id' => array( 'name' => 'saved_search_id', 'type' => 1, 'title' => 'Saved Search ID', 'FKClassName' => 'CRM_Contact_DAO_SavedSearch', ), - 'is_active' => array( + 'is_active' => array( 'name' => 'is_active', 'type' => 16, 'title' => 'Group Enabled', 'api.default' => 1, ), - 'visibility' => array( + 'visibility' => array( 'name' => 'visibility', 'type' => 2, 'title' => 'Group Visibility Setting', 'default' => 'User and User Admin Only', 'enumValues' => 'User and User Admin Only,Public Pages', - 'options' => array( - '0' => 'User and User Admin Only', - '1' => 'Public Pages', - ), ), - 'where_clause' => array( + 'where_clause' => array( 'name' => 'where_clause', 'type' => 32, 'title' => 'Group Where Clause', ), - 'select_tables' => array( + 'select_tables' => array( 'name' => 'select_tables', 'type' => 32, 'title' => 'Tables For Select Clause', ), - 'where_tables' => array( + 'where_tables' => array( 'name' => 'where_tables', 'type' => 32, 'title' => 'Tables For Where Clause', ), - 'group_type' => array( + 'group_type' => array( 'name' => 'group_type', 'type' => 2, 'title' => 'Group Type', 'maxlength' => 128, 'size' => 45, ), - 'cache_date' => array( + 'cache_date' => array( 'name' => 'cache_date', 'type' => 12, 'title' => 'Group Cache Date', ), - 'refresh_date' => array( + 'refresh_date' => array( 'name' => 'refresh_date', 'type' => 12, 'title' => 'Next Group Refresh Time', ), - 'parents' => array( + 'parents' => array( 'name' => 'parents', 'type' => 32, 'title' => 'Group Parents', ), - 'children' => array( + 'children' => array( 'name' => 'children', 'type' => 32, 'title' => 'Group Children', ), - 'is_hidden' => array( + 'is_hidden' => array( 'name' => 'is_hidden', 'type' => 16, 'title' => 'Group is Hidden', ), - 'is_reserved' => array( + 'is_reserved' => array( 'name' => 'is_reserved', 'type' => 16, 'title' => 'Group is Reserved', ), - 'created_id' => array( + 'created_id' => array( 'name' => 'created_id', 'type' => 1, 'title' => 'Group Created By', diff --git a/api/v3/examples/GroupContact/GetWithGroupID.php b/api/v3/examples/GroupContact/GetWithGroupID.php index e396e4e05e..c8e8772afc 100644 --- a/api/v3/examples/GroupContact/GetWithGroupID.php +++ b/api/v3/examples/GroupContact/GetWithGroupID.php @@ -4,7 +4,7 @@ Get all from group and display contacts */ function group_contact_get_example(){ -$params = array( +$params = array( 'group_id' => 1, 'version' => 3, 'api.group.get' => 1, @@ -21,23 +21,23 @@ $params = array( */ function group_contact_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 2, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'group_id' => '1', 'contact_id' => '3', 'status' => 'Added', - 'api.group.get' => array( + 'api.group.get' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'name' => 'Test Group 1_1', 'title' => 'New Test Group Created', @@ -47,9 +47,9 @@ function group_contact_get_expectedresult(){ 'is_active' => '1', 'visibility' => 'Public Pages', 'where_clause' => ' ( `civicrm_group_contact-1`.group_id IN ( 1 ) AND `civicrm_group_contact-1`.status IN ("Added") ) ', - 'select_tables' => 'a:12:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";s:6:"gender";i:1;s:17:"individual_prefix";i:1;s:17:"individual_suffix";i:1;}', + 'select_tables' => 'a:9:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";}', 'where_tables' => 'a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";}', - 'group_type' => array( + 'group_type' => array( '0' => '1', '1' => '2', ), @@ -64,18 +64,18 @@ function group_contact_get_expectedresult(){ ), ), ), - '1' => array( + '1' => array( 'id' => '2', 'group_id' => '1', 'contact_id' => '1', 'status' => 'Added', - 'api.group.get' => array( + 'api.group.get' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'name' => 'Test Group 1_1', 'title' => 'New Test Group Created', @@ -85,9 +85,9 @@ function group_contact_get_expectedresult(){ 'is_active' => '1', 'visibility' => 'Public Pages', 'where_clause' => ' ( `civicrm_group_contact-1`.group_id IN ( 1 ) AND `civicrm_group_contact-1`.status IN ("Added") ) ', - 'select_tables' => 'a:12:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";s:6:"gender";i:1;s:17:"individual_prefix";i:1;s:17:"individual_suffix";i:1;}', + 'select_tables' => 'a:9:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";}', 'where_tables' => 'a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";}', - 'group_type' => array( + 'group_type' => array( '0' => '1', '1' => '2', ), diff --git a/api/v3/examples/GroupContactCreate.php b/api/v3/examples/GroupContactCreate.php index 49ec55f1ba..1dc180c0a4 100644 --- a/api/v3/examples/GroupContactCreate.php +++ b/api/v3/examples/GroupContactCreate.php @@ -4,7 +4,7 @@ */ function group_contact_create_example(){ -$params = array( +$params = array( 'contact_id' => 1, 'contact_id.2' => 2, 'group_id' => 1, @@ -21,7 +21,7 @@ $params = array( */ function group_contact_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/GroupContactDelete.php b/api/v3/examples/GroupContactDelete.php index 51afa87a66..87ab9e311f 100644 --- a/api/v3/examples/GroupContactDelete.php +++ b/api/v3/examples/GroupContactDelete.php @@ -4,7 +4,7 @@ */ function group_contact_delete_example(){ -$params = array( +$params = array( 'contact_id' => 1, 'group_id' => 1, 'version' => 3, @@ -20,7 +20,7 @@ $params = array( */ function group_contact_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/GroupContactGet.php b/api/v3/examples/GroupContactGet.php index f093527e32..aabe20108d 100644 --- a/api/v3/examples/GroupContactGet.php +++ b/api/v3/examples/GroupContactGet.php @@ -4,7 +4,7 @@ */ function group_contact_get_example(){ -$params = array( +$params = array( 'contact_id' => 3, 'version' => 3, ); @@ -19,19 +19,19 @@ $params = array( */ function group_contact_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'group_id' => '1', 'title' => 'New Test Group Created', 'visibility' => 'Public Pages', 'is_hidden' => 0, - 'in_date' => '2013-02-04 22:32:04', + 'in_date' => '2013-06-22 08:50:14', 'in_method' => 'API', ), ), diff --git a/api/v3/examples/GroupGet.php b/api/v3/examples/GroupGet.php index 35d28431e6..f3506f99ae 100644 --- a/api/v3/examples/GroupGet.php +++ b/api/v3/examples/GroupGet.php @@ -4,9 +4,9 @@ */ function group_get_example(){ -$params = array( +$params = array( 'version' => 3, - 'name' => 'Test Group 1_6', + 'name' => 'Test Group 1_5', ); $result = civicrm_api( 'group','get',$params ); @@ -19,25 +19,25 @@ $params = array( */ function group_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 6, - 'values' => array( - '6' => array( - 'id' => '6', - 'name' => 'Test Group 1_6', + 'id' => 5, + 'values' => array( + '5' => array( + 'id' => '5', + 'name' => 'Test Group 1_5', 'title' => 'New Test Group Created', 'description' => 'New Test Group Created', 'source' => '', 'saved_search_id' => '', 'is_active' => '1', 'visibility' => 'Public Pages', - 'where_clause' => ' ( `civicrm_group_contact-6`.group_id IN ( 6 ) AND `civicrm_group_contact-6`.status IN ("Added") ) ', - 'select_tables' => 'a:12:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-6`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-6` ON contact_a.id = `civicrm_group_contact-6`.contact_id ";s:6:"gender";i:1;s:17:"individual_prefix";i:1;s:17:"individual_suffix";i:1;}', - 'where_tables' => 'a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-6`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-6` ON contact_a.id = `civicrm_group_contact-6`.contact_id ";}', - 'group_type' => array( + 'where_clause' => ' ( `civicrm_group_contact-5`.group_id IN ( 5 ) AND `civicrm_group_contact-5`.status IN ("Added") ) ', + 'select_tables' => 'a:9:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";}', + 'where_tables' => 'a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";}', + 'group_type' => array( '0' => '1', '1' => '2', ), diff --git a/api/v3/examples/GroupNestingCreate.php b/api/v3/examples/GroupNestingCreate.php index b19801414e..50634eabd0 100644 --- a/api/v3/examples/GroupNestingCreate.php +++ b/api/v3/examples/GroupNestingCreate.php @@ -4,7 +4,7 @@ */ function group_nesting_create_example(){ -$params = array( +$params = array( 'parent_group_id' => 1, 'child_group_id' => 3, 'version' => 3, @@ -20,12 +20,12 @@ $params = array( */ function group_nesting_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 'is_error', - 'values' => array( + 'values' => array( 'is_error' => 0, ), ); diff --git a/api/v3/examples/GroupNestingDelete.php b/api/v3/examples/GroupNestingDelete.php index fbef0b90c9..6fe5997088 100644 --- a/api/v3/examples/GroupNestingDelete.php +++ b/api/v3/examples/GroupNestingDelete.php @@ -4,7 +4,7 @@ */ function group_nesting_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 1, ); @@ -19,7 +19,7 @@ $params = array( */ function group_nesting_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/GroupNestingGet.php b/api/v3/examples/GroupNestingGet.php index 6636e39645..ccf2b2e113 100644 --- a/api/v3/examples/GroupNestingGet.php +++ b/api/v3/examples/GroupNestingGet.php @@ -4,7 +4,7 @@ */ function group_nesting_get_example(){ -$params = array( +$params = array( 'parent_group_id' => 1, 'child_group_id' => 2, 'version' => 3, @@ -20,13 +20,13 @@ $params = array( */ function group_nesting_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'child_group_id' => '2', 'parent_group_id' => '1', diff --git a/api/v3/examples/GroupOrganizationCreate.php b/api/v3/examples/GroupOrganizationCreate.php index 3cd91207e9..44f51c73ad 100644 --- a/api/v3/examples/GroupOrganizationCreate.php +++ b/api/v3/examples/GroupOrganizationCreate.php @@ -4,7 +4,7 @@ */ function group_organization_create_example(){ -$params = array( +$params = array( 'organization_id' => 1, 'group_id' => 1, 'version' => 3, @@ -20,12 +20,12 @@ $params = array( */ function group_organization_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 3, 'id' => 1, - 'values' => array( + 'values' => array( 'id' => '1', 'group_id' => '1', 'organization_id' => '1', diff --git a/api/v3/examples/GroupOrganizationDelete.php b/api/v3/examples/GroupOrganizationDelete.php index 9aaa2a8650..ca3656287d 100644 --- a/api/v3/examples/GroupOrganizationDelete.php +++ b/api/v3/examples/GroupOrganizationDelete.php @@ -4,7 +4,7 @@ */ function group_organization_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function group_organization_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/GroupOrganizationGet.php b/api/v3/examples/GroupOrganizationGet.php index 58b962ce23..46bce4da70 100644 --- a/api/v3/examples/GroupOrganizationGet.php +++ b/api/v3/examples/GroupOrganizationGet.php @@ -4,7 +4,7 @@ */ function group_organization_get_example(){ -$params = array( +$params = array( 'organization_id' => 1, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function group_organization_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 0, diff --git a/api/v3/examples/ImCreate.php b/api/v3/examples/ImCreate.php index 0f77f1e68b..db62ed7487 100644 --- a/api/v3/examples/ImCreate.php +++ b/api/v3/examples/ImCreate.php @@ -4,7 +4,7 @@ */ function im_create_example(){ -$params = array( +$params = array( 'version' => 3, 'contact_id' => 3, 'name' => 'My Yahoo IM Handle', @@ -22,13 +22,13 @@ $params = array( */ function im_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '3', 'location_type_id' => '1', diff --git a/api/v3/examples/ImDelete.php b/api/v3/examples/ImDelete.php index b6de0a777f..e9558581df 100644 --- a/api/v3/examples/ImDelete.php +++ b/api/v3/examples/ImDelete.php @@ -4,7 +4,7 @@ */ function im_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 1, ); @@ -19,11 +19,11 @@ $params = array( */ function im_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => 1, + 'values' => true, ); return $expectedResult ; diff --git a/api/v3/examples/ImGet.php b/api/v3/examples/ImGet.php index 14dd47f3ac..d8451607bd 100644 --- a/api/v3/examples/ImGet.php +++ b/api/v3/examples/ImGet.php @@ -4,7 +4,7 @@ */ function im_get_example(){ -$params = array( +$params = array( 'version' => 3, 'contact_id' => 1, 'name' => 'My Yahoo IM Handle', @@ -22,13 +22,13 @@ $params = array( */ function im_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '1', 'location_type_id' => '1', diff --git a/api/v3/examples/JobCreate.php b/api/v3/examples/JobCreate.php index 2fbcc6baae..7a3eb49161 100644 --- a/api/v3/examples/JobCreate.php +++ b/api/v3/examples/JobCreate.php @@ -4,7 +4,7 @@ */ function job_create_example(){ -$params = array( +$params = array( 'version' => 3, 'sequential' => 1, 'name' => 'API_Test_Job', @@ -26,13 +26,13 @@ $params = array( */ function job_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'domain_id' => '1', 'run_frequency' => 'Daily', diff --git a/api/v3/examples/JobDelete.php b/api/v3/examples/JobDelete.php index c0403d287b..970993faf1 100644 --- a/api/v3/examples/JobDelete.php +++ b/api/v3/examples/JobDelete.php @@ -4,7 +4,7 @@ */ function job_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function job_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/LineItemCreate.php b/api/v3/examples/LineItemCreate.php index 7119e98a85..fd0ce15f35 100644 --- a/api/v3/examples/LineItemCreate.php +++ b/api/v3/examples/LineItemCreate.php @@ -4,7 +4,7 @@ */ function line_item_create_example(){ -$params = array( +$params = array( 'version' => 3, 'price_field_value_id' => 1, 'price_field_id' => 1, @@ -25,9 +25,9 @@ $params = array( */ function line_item_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, - 'undefined_fields' => array( + 'undefined_fields' => array( '0' => 'label', '1' => 'price_field_value_id', '2' => 'price_field_id', @@ -40,8 +40,8 @@ function line_item_create_expectedresult(){ 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'entity_table' => 'civicrm_contribution', 'entity_id' => '1', @@ -56,10 +56,10 @@ function line_item_create_expectedresult(){ 'deductible_amount' => '', ), ), - 'xdebug' => array( - 'peakMemory' => 116918264, - 'memory' => 108682632, - 'timeIndex' => '804.56360793114', + 'xdebug' => array( + 'peakMemory' => 144948640, + 'memory' => 131358352, + 'timeIndex' => '1877.7615101337', ), ); diff --git a/api/v3/examples/LineItemDelete.php b/api/v3/examples/LineItemDelete.php index 5f2c4eabb3..ded11f5298 100644 --- a/api/v3/examples/LineItemDelete.php +++ b/api/v3/examples/LineItemDelete.php @@ -4,7 +4,7 @@ */ function line_item_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 1, ); @@ -19,7 +19,7 @@ $params = array( */ function line_item_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/LineItemGet.php b/api/v3/examples/LineItemGet.php index ea7c9adef0..3e94135dba 100644 --- a/api/v3/examples/LineItemGet.php +++ b/api/v3/examples/LineItemGet.php @@ -4,7 +4,7 @@ */ function line_item_get_example(){ -$params = array( +$params = array( 'version' => 3, 'entity_table' => 'civicrm_contribution', ); @@ -19,13 +19,13 @@ $params = array( */ function line_item_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'entity_table' => 'civicrm_contribution', 'entity_id' => '1', diff --git a/api/v3/examples/LocBlockCreate.php b/api/v3/examples/LocBlockCreate.php index 2ce3383b19..a2716516ee 100644 --- a/api/v3/examples/LocBlockCreate.php +++ b/api/v3/examples/LocBlockCreate.php @@ -5,7 +5,6 @@ */ function loc_block_create_example(){ $params = array( - 'version' => 3, 'address_id' => 2, 'phone_id' => 2, 'email_id' => 3, @@ -39,6 +38,11 @@ function loc_block_create_expectedresult(){ 'im_2_id' => '', ), ), + 'xdebug' => array( + 'peakMemory' => 145366376, + 'memory' => 131621280, + 'timeIndex' => '1882.6170191765', + ), ); return $expectedResult ; diff --git a/api/v3/examples/LocBlockCreateEntities.php b/api/v3/examples/LocBlockCreateEntities.php index 545e64b2f1..a71bf66096 100644 --- a/api/v3/examples/LocBlockCreateEntities.php +++ b/api/v3/examples/LocBlockCreateEntities.php @@ -5,7 +5,6 @@ */ function loc_block_createentities_example(){ $params = array( - 'version' => 3, 'email' => array( 'location_type_id' => 1, 'email' => 'test2@loc.block', @@ -22,6 +21,8 @@ $params = array( 'location_type_id' => 1, 'street_address' => '987654321', ), + 'version' => 3, + 'debug' => 0, ); $result = civicrm_api( 'loc_block','createEntities',$params ); diff --git a/api/v3/examples/MailSettings/ChainedGetDelete.php b/api/v3/examples/MailSettings/ChainedGetDelete.php index 3b5239f6ea..bb6a60a6ce 100644 --- a/api/v3/examples/MailSettings/ChainedGetDelete.php +++ b/api/v3/examples/MailSettings/ChainedGetDelete.php @@ -4,7 +4,7 @@ demonstrates get + delete in the same call */ function mail_settings_get_example(){ -$params = array( +$params = array( 'version' => 3, 'title' => 'MailSettings title', 'api.MailSettings.delete' => 1, @@ -20,25 +20,25 @@ $params = array( */ function mail_settings_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 2, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'domain_id' => '1', 'name' => 'default', 'is_default' => '1', 'domain' => 'EXAMPLE.ORG', - 'api.MailSettings.delete' => array( + 'api.MailSettings.delete' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'values' => 1, ), ), - '3' => array( + '3' => array( 'id' => '3', 'domain_id' => '1', 'name' => 'my mail setting', @@ -48,7 +48,7 @@ function mail_settings_get_expectedresult(){ 'username' => 'sue', 'password' => 'pass', 'is_ssl' => 0, - 'api.MailSettings.delete' => array( + 'api.MailSettings.delete' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/MailSettingsCreate.php b/api/v3/examples/MailSettingsCreate.php index d4f3173471..b8f246187f 100644 --- a/api/v3/examples/MailSettingsCreate.php +++ b/api/v3/examples/MailSettingsCreate.php @@ -4,7 +4,7 @@ */ function mail_settings_create_example(){ -$params = array( +$params = array( 'domain_id' => 1, 'name' => 'my mail setting', 'domain' => 'setting.com', @@ -25,13 +25,13 @@ $params = array( */ function mail_settings_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'id' => '2', 'domain_id' => '1', 'name' => 'my mail setting', diff --git a/api/v3/examples/MailSettingsDelete.php b/api/v3/examples/MailSettingsDelete.php index 391b1aea0e..bcd66dfcb7 100644 --- a/api/v3/examples/MailSettingsDelete.php +++ b/api/v3/examples/MailSettingsDelete.php @@ -4,7 +4,7 @@ */ function mail_settings_delete_example(){ -$params = array( +$params = array( 'domain_id' => 1, 'name' => 'my mail setting', 'domain' => 'setting.com', @@ -25,7 +25,7 @@ $params = array( */ function mail_settings_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/MailSettingsGet.php b/api/v3/examples/MailSettingsGet.php index 4f2c827e4d..c5090886c5 100644 --- a/api/v3/examples/MailSettingsGet.php +++ b/api/v3/examples/MailSettingsGet.php @@ -4,7 +4,7 @@ */ function mail_settings_get_example(){ -$params = array( +$params = array( 'domain_id' => 1, 'name' => 'my mail setting', 'domain' => 'setting.com', @@ -25,13 +25,13 @@ $params = array( */ function mail_settings_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'id' => '2', 'domain_id' => '1', 'name' => 'my mail setting', diff --git a/api/v3/examples/MailingCreate.php b/api/v3/examples/MailingCreate.php index d5c277b810..8ef2f999f9 100644 --- a/api/v3/examples/MailingCreate.php +++ b/api/v3/examples/MailingCreate.php @@ -4,7 +4,7 @@ */ function mailing_create_example(){ -$params = array( +$params = array( 'subject' => 'maild', 'body_text' => 'bdkfhdskfhduew', 'version' => 3, @@ -22,13 +22,13 @@ $params = array( */ function mailing_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'domain_id' => '1', 'header_id' => 'null', @@ -52,11 +52,11 @@ function mailing_create_expectedresult(){ 'msg_template_id' => '', 'override_verp' => '1', 'created_id' => '1', - 'created_date' => '20130204223402', + 'created_date' => '20120130621222105', 'scheduled_id' => '', - 'scheduled_date' => '20130204223402', + 'scheduled_date' => '20130622085501', 'approver_id' => '1', - 'approval_date' => '20130204223402', + 'approval_date' => '20130622085501', 'approval_status_id' => '', 'approval_note' => '', 'is_archived' => '', @@ -64,16 +64,16 @@ function mailing_create_expectedresult(){ 'campaign_id' => '', 'dedupe_email' => '', 'sms_provider_id' => '', - 'api.mailing_job.create' => array( + 'api.mailing_job.create' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'mailing_id' => '1', - 'scheduled_date' => '20130204223402', + 'scheduled_date' => '20130622085501', 'start_date' => '', 'end_date' => '', 'status' => 'Scheduled', diff --git a/api/v3/examples/MailingGroupSubscribe.php b/api/v3/examples/MailingGroupSubscribe.php index ddd6b4a710..6ed2b2c18a 100644 --- a/api/v3/examples/MailingGroupSubscribe.php +++ b/api/v3/examples/MailingGroupSubscribe.php @@ -4,7 +4,7 @@ */ function mailing_group_subscribe_example(){ -$params = array( +$params = array( 'email' => 'test@test.test', 'group_id' => 2, 'contact_id' => 3, @@ -23,14 +23,14 @@ $params = array( */ function mailing_group_subscribe_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 4, - 'values' => array( + 'values' => array( 'contact_id' => '3', 'subscribe_id' => '1', - 'hash' => '36e4a45e541c4aa3', + 'hash' => '5b056fa32d2d56c6', 'is_error' => 0, ), ); diff --git a/api/v3/examples/Membership/filterIsCurrent.php b/api/v3/examples/Membership/filterIsCurrent.php index c309b87b12..db786971a9 100644 --- a/api/v3/examples/Membership/filterIsCurrent.php +++ b/api/v3/examples/Membership/filterIsCurrent.php @@ -4,9 +4,9 @@ Demonstrates use of 'filter' active_only' param */ function membership_get_example(){ -$params = array( - 'contact_id' => 14, - 'filters' => array( +$params = array( + 'contact_id' => 13, + 'filters' => array( 'is_current' => 1, ), 'version' => 3, @@ -22,18 +22,18 @@ $params = array( */ function membership_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'membership_id' => '1', - 'contact_id' => '14', - 'membership_contact_id' => '14', - 'membership_type_id' => '12', + 'contact_id' => '13', + 'membership_contact_id' => '13', + 'membership_type_id' => '11', 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'membership_start_date' => '2009-01-21', @@ -41,7 +41,7 @@ function membership_get_expectedresult(){ 'membership_end_date' => '2009-12-21', 'source' => 'Payment', 'membership_source' => 'Payment', - 'status_id' => '19', + 'status_id' => '18', 'is_override' => '1', 'is_test' => 0, 'member_is_test' => 0, diff --git a/api/v3/examples/MembershipCreate.php b/api/v3/examples/MembershipCreate.php index fa3c5c29b5..82fbdfe3f9 100644 --- a/api/v3/examples/MembershipCreate.php +++ b/api/v3/examples/MembershipCreate.php @@ -4,15 +4,15 @@ */ function membership_create_example(){ -$params = array( - 'contact_id' => 27, - 'membership_type_id' => 24, +$params = array( + 'contact_id' => 26, + 'membership_type_id' => 23, 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 30, + 'status_id' => 29, 'version' => 3, 'custom_2' => 'custom string', ); @@ -27,21 +27,21 @@ $params = array( */ function membership_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', - 'contact_id' => '27', - 'membership_type_id' => '24', + 'contact_id' => '26', + 'membership_type_id' => '23', 'join_date' => '20090121000000', 'start_date' => '20090121000000', 'end_date' => '20091221000000', 'source' => 'Payment', - 'status_id' => '30', + 'status_id' => '29', 'is_override' => '1', 'owner_membership_id' => '', 'max_related' => '', diff --git a/api/v3/examples/MembershipDelete.php b/api/v3/examples/MembershipDelete.php index d787a6e07b..610dbcdc65 100644 --- a/api/v3/examples/MembershipDelete.php +++ b/api/v3/examples/MembershipDelete.php @@ -4,7 +4,7 @@ */ function membership_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function membership_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/MembershipGet.php b/api/v3/examples/MembershipGet.php index 7a4ff82870..2a02a7cf35 100644 --- a/api/v3/examples/MembershipGet.php +++ b/api/v3/examples/MembershipGet.php @@ -4,9 +4,9 @@ */ function membership_get_example(){ -$params = array( +$params = array( 'version' => 3, - 'membership_type_id' => 9, + 'membership_type_id' => 8, ); $result = civicrm_api( 'membership','get',$params ); @@ -19,21 +19,21 @@ $params = array( */ function membership_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', - 'contact_id' => '11', - 'membership_type_id' => '9', + 'contact_id' => '10', + 'membership_type_id' => '8', 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', 'source' => 'Payment', - 'status_id' => '16', + 'status_id' => '15', 'is_override' => '1', 'is_test' => 0, 'is_pay_later' => 0, diff --git a/api/v3/examples/MembershipPaymentCreate.php b/api/v3/examples/MembershipPaymentCreate.php index 58dc671523..73e675b554 100644 --- a/api/v3/examples/MembershipPaymentCreate.php +++ b/api/v3/examples/MembershipPaymentCreate.php @@ -4,7 +4,7 @@ */ function membership_payment_create_example(){ -$params = array( +$params = array( 'contribution_id' => 1, 'membership_id' => 1, 'version' => 3, @@ -20,13 +20,13 @@ $params = array( */ function membership_payment_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'membership_id' => '1', 'contribution_id' => '1', diff --git a/api/v3/examples/MembershipPaymentGet.php b/api/v3/examples/MembershipPaymentGet.php index 27d8087118..42e5b15a49 100644 --- a/api/v3/examples/MembershipPaymentGet.php +++ b/api/v3/examples/MembershipPaymentGet.php @@ -4,7 +4,7 @@ */ function membership_payment_get_example(){ -$params = array( +$params = array( 'contribution_id' => 1, 'membership_id' => 1, 'version' => 3, @@ -20,13 +20,13 @@ $params = array( */ function membership_payment_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'membership_id' => '1', 'contribution_id' => '1', diff --git a/api/v3/examples/MembershipStatusCreate.php b/api/v3/examples/MembershipStatusCreate.php index de395f6a57..970706cb3b 100644 --- a/api/v3/examples/MembershipStatusCreate.php +++ b/api/v3/examples/MembershipStatusCreate.php @@ -4,7 +4,7 @@ */ function membership_status_create_example(){ -$params = array( +$params = array( 'name' => 'test membership status', 'version' => 3, ); @@ -19,13 +19,13 @@ $params = array( */ function membership_status_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 19, - 'values' => array( - '19' => array( + 'values' => array( + '19' => array( 'id' => '19', 'name' => 'test membership status', 'label' => 'test membership status', diff --git a/api/v3/examples/MembershipStatusGet.php b/api/v3/examples/MembershipStatusGet.php index c08ab1bdf0..7e21356c0d 100644 --- a/api/v3/examples/MembershipStatusGet.php +++ b/api/v3/examples/MembershipStatusGet.php @@ -4,7 +4,7 @@ */ function membership_status_get_example(){ -$params = array( +$params = array( 'name' => 'test status', 'version' => 3, ); @@ -19,13 +19,13 @@ $params = array( */ function membership_status_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 10, - 'values' => array( - '10' => array( + 'values' => array( + '10' => array( 'id' => '10', 'name' => 'test status', 'label' => 'test status', diff --git a/api/v3/examples/MembershipTypeCreate.php b/api/v3/examples/MembershipTypeCreate.php index cdde261187..a48de6940f 100644 --- a/api/v3/examples/MembershipTypeCreate.php +++ b/api/v3/examples/MembershipTypeCreate.php @@ -4,7 +4,7 @@ */ function membership_type_create_example(){ -$params = array( +$params = array( 'name' => '40+ Membership', 'description' => 'people above 40 are given health instructions', 'member_of_contact_id' => 1, @@ -28,13 +28,13 @@ $params = array( */ function membership_type_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'id' => '2', 'domain_id' => '1', 'name' => '40+ Membership', @@ -50,12 +50,13 @@ function membership_type_create_expectedresult(){ 'relationship_type_id' => '', 'relationship_direction' => '', 'max_related' => '', - 'visibility' => 'public', + 'visibility' => '1', 'weight' => '', 'receipt_text_signup' => '', 'receipt_text_renewal' => '', 'auto_renew' => '', 'is_active' => '', + 'contribution_type_id' => '1', ), ), ); diff --git a/api/v3/examples/MembershipTypeDelete.php b/api/v3/examples/MembershipTypeDelete.php index e50fe40c6a..584d6d7892 100644 --- a/api/v3/examples/MembershipTypeDelete.php +++ b/api/v3/examples/MembershipTypeDelete.php @@ -4,7 +4,7 @@ */ function membership_type_delete_example(){ -$params = array( +$params = array( 'id' => 4, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function membership_type_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/MembershipTypeGet.php b/api/v3/examples/MembershipTypeGet.php index f294ede7ba..482b6d59d3 100644 --- a/api/v3/examples/MembershipTypeGet.php +++ b/api/v3/examples/MembershipTypeGet.php @@ -4,7 +4,7 @@ */ function membership_type_get_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,13 +19,13 @@ $params = array( */ function membership_type_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'domain_id' => '1', 'name' => 'General', diff --git a/api/v3/examples/MembershipUpdate.php b/api/v3/examples/MembershipUpdate.php index 2b6d0bdb7e..b0b17bcbf9 100644 --- a/api/v3/examples/MembershipUpdate.php +++ b/api/v3/examples/MembershipUpdate.php @@ -4,15 +4,15 @@ */ function membership_update_example(){ -$params = array( - 'contact_id' => 33, - 'membership_type_id' => 30, +$params = array( + 'contact_id' => 32, + 'membership_type_id' => 29, 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 36, + 'status_id' => 35, 'version' => 3, 'custom_3' => 'custom string', ); @@ -27,21 +27,21 @@ $params = array( */ function membership_update_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', - 'contact_id' => '33', - 'membership_type_id' => '30', + 'contact_id' => '32', + 'membership_type_id' => '29', 'join_date' => '20090121000000', 'start_date' => '20090121000000', 'end_date' => '20091221000000', 'source' => 'Payment', - 'status_id' => '36', + 'status_id' => '35', 'is_override' => '1', 'owner_membership_id' => '', 'max_related' => '', diff --git a/api/v3/examples/NoteCreate.php b/api/v3/examples/NoteCreate.php index a9e96b9777..43a4a16454 100644 --- a/api/v3/examples/NoteCreate.php +++ b/api/v3/examples/NoteCreate.php @@ -4,7 +4,7 @@ */ function note_create_example(){ -$params = array( +$params = array( 'entity_table' => 'civicrm_contact', 'entity_id' => 1, 'note' => 'Hello!!! m testing Note', @@ -24,13 +24,13 @@ $params = array( */ function note_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'id' => '2', 'entity_table' => 'civicrm_contact', 'entity_id' => '1', diff --git a/api/v3/examples/NoteDelete.php b/api/v3/examples/NoteDelete.php index 938d89ac13..07d637bfdc 100644 --- a/api/v3/examples/NoteDelete.php +++ b/api/v3/examples/NoteDelete.php @@ -4,7 +4,7 @@ */ function note_delete_example(){ -$params = array( +$params = array( 'id' => 2, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function note_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/NoteGet.php b/api/v3/examples/NoteGet.php index 015ed88243..51fca52077 100644 --- a/api/v3/examples/NoteGet.php +++ b/api/v3/examples/NoteGet.php @@ -4,7 +4,7 @@ */ function note_get_example(){ -$params = array( +$params = array( 'entity_table' => 'civicrm_contact', 'entity_id' => 1, 'note' => 'Hello!!! m testing Note', @@ -24,13 +24,13 @@ $params = array( */ function note_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'entity_table' => 'civicrm_contact', 'entity_id' => '1', diff --git a/api/v3/examples/OptionGroupCreate.php b/api/v3/examples/OptionGroupCreate.php index 5380d7d7d9..3b77df3919 100644 --- a/api/v3/examples/OptionGroupCreate.php +++ b/api/v3/examples/OptionGroupCreate.php @@ -4,13 +4,13 @@ */ function option_group_create_example(){ -$params = array( +$params = array( 'version' => 3, 'sequential' => 1, 'name' => 'civicrm_event.amount.560', 'is_reserved' => 1, 'is_active' => 1, - 'api.OptionValue.create' => array( + 'api.OptionValue.create' => array( 'label' => 'workshop', 'value' => 35, 'is_default' => 1, @@ -29,20 +29,20 @@ $params = array( */ function option_group_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 86, - 'values' => array( - '0' => array( - 'id' => '86', + 'id' => 84, + 'values' => array( + '0' => array( + 'id' => '84', 'name' => 'civicrm_event.amount.560', 'title' => '', 'description' => '', 'is_reserved' => '1', 'is_active' => '1', - 'api.OptionValue.create' => 723, + 'api.OptionValue.create' => 720, ), ), ); diff --git a/api/v3/examples/OptionGroupGet.php b/api/v3/examples/OptionGroupGet.php index ec174c8bab..b4fc0ceca6 100644 --- a/api/v3/examples/OptionGroupGet.php +++ b/api/v3/examples/OptionGroupGet.php @@ -4,7 +4,7 @@ */ function option_group_get_example(){ -$params = array( +$params = array( 'name' => 'preferred_communication_method', 'version' => 3, ); @@ -19,13 +19,13 @@ $params = array( */ function option_group_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'name' => 'preferred_communication_method', 'title' => 'Preferred Communication Method', diff --git a/api/v3/examples/OptionValue/SortOption.php b/api/v3/examples/OptionValue/SortOption.php index 49329e6725..6003443243 100644 --- a/api/v3/examples/OptionValue/SortOption.php +++ b/api/v3/examples/OptionValue/SortOption.php @@ -4,10 +4,10 @@ demonstrates use of Sort param (available in many api functions). Also, getsingle */ function option_value_getsingle_example(){ -$params = array( +$params = array( 'option_group_id' => 1, 'version' => 3, - 'options' => array( + 'options' => array( 'sort' => 'label DESC', 'limit' => 1, ), @@ -23,7 +23,7 @@ $params = array( */ function option_value_getsingle_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'id' => '4', 'option_group_id' => '1', 'label' => 'SMS', diff --git a/api/v3/examples/OptionValueGet.php b/api/v3/examples/OptionValueGet.php index 87b918d902..dbce441a53 100644 --- a/api/v3/examples/OptionValueGet.php +++ b/api/v3/examples/OptionValueGet.php @@ -4,7 +4,7 @@ */ function option_value_get_example(){ -$params = array( +$params = array( 'option_group_id' => 1, 'version' => 3, ); @@ -19,12 +19,12 @@ $params = array( */ function option_value_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 5, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'option_group_id' => '1', 'label' => 'Phone', @@ -35,7 +35,7 @@ function option_value_get_expectedresult(){ 'is_reserved' => 0, 'is_active' => '1', ), - '2' => array( + '2' => array( 'id' => '2', 'option_group_id' => '1', 'label' => 'Email', @@ -46,7 +46,7 @@ function option_value_get_expectedresult(){ 'is_reserved' => 0, 'is_active' => '1', ), - '3' => array( + '3' => array( 'id' => '3', 'option_group_id' => '1', 'label' => 'Postal Mail', @@ -57,7 +57,7 @@ function option_value_get_expectedresult(){ 'is_reserved' => 0, 'is_active' => '1', ), - '4' => array( + '4' => array( 'id' => '4', 'option_group_id' => '1', 'label' => 'SMS', @@ -68,7 +68,7 @@ function option_value_get_expectedresult(){ 'is_reserved' => 0, 'is_active' => '1', ), - '5' => array( + '5' => array( 'id' => '5', 'option_group_id' => '1', 'label' => 'Fax', diff --git a/api/v3/examples/Participant/CreateParticipantPayment.php b/api/v3/examples/Participant/CreateParticipantPayment.php index 9f43998d83..4c9df79844 100644 --- a/api/v3/examples/Participant/CreateParticipantPayment.php +++ b/api/v3/examples/Participant/CreateParticipantPayment.php @@ -5,22 +5,22 @@ case of 'contribution' the 'create' is implied (api.contribution.create) */ function participant_create_example(){ -$params = array( +$params = array( 'contact_type' => 'Individual', 'display_name' => 'dlobo', 'version' => 3, - 'api.participant' => array( + 'api.participant' => array( 'event_id' => 38, 'status_id' => 1, 'role_id' => 1, 'format.only_id' => 1, ), - 'api.contribution.create' => array( + 'api.contribution.create' => array( 'financial_type_id' => 1, 'total_amount' => 100, 'format.only_id' => 1, ), - 'api.participant_payment.create' => array( + 'api.participant_payment.create' => array( 'contribution_id' => '$value.api.contribution.create', 'participant_id' => '$value.api.participant', ), @@ -36,13 +36,13 @@ $params = array( */ function participant_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 5, - 'values' => array( - '5' => array( + 'values' => array( + '5' => array( 'id' => '5', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -88,17 +88,17 @@ function participant_create_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'user_unique_id' => '', - 'created_date' => '2013-02-05 11:38:34', + 'created_date' => '20120130621222105', 'modified_date' => '2012-11-14 16:02:35', 'api.participant' => 4, 'api.contribution.create' => 1, - 'api.participant_payment.create' => array( + 'api.participant_payment.create' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'participant_id' => '4', 'contribution_id' => '1', diff --git a/api/v3/examples/Participant/NestedDelete.php b/api/v3/examples/Participant/NestedDelete.php index 1edd6f5194..d786d42fe2 100644 --- a/api/v3/examples/Participant/NestedDelete.php +++ b/api/v3/examples/Participant/NestedDelete.php @@ -4,7 +4,7 @@ Criteria delete by nesting a GET & a DELETE */ function participant_get_example(){ -$params = array( +$params = array( 'version' => 3, 'contact_id' => 4, 'api.participant.delete' => 1, @@ -20,12 +20,12 @@ $params = array( */ function participant_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'contact_id' => '4', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -52,14 +52,14 @@ function participant_get_expectedresult(){ 'participant_discount_name' => '', 'participant_campaign_id' => '', 'id' => '2', - 'api.participant.delete' => array( + 'api.participant.delete' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'values' => 1, ), ), - '3' => array( + '3' => array( 'contact_id' => '4', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -86,7 +86,7 @@ function participant_get_expectedresult(){ 'participant_discount_name' => '', 'participant_campaign_id' => '', 'id' => '3', - 'api.participant.delete' => array( + 'api.participant.delete' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/Participant/NestedEventGet.php b/api/v3/examples/Participant/NestedEventGet.php index f8418b89c1..aeb472a37b 100644 --- a/api/v3/examples/Participant/NestedEventGet.php +++ b/api/v3/examples/Participant/NestedEventGet.php @@ -4,7 +4,7 @@ use nested get to get an event */ function participant_get_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, 'api.event.get' => 1, @@ -20,13 +20,13 @@ $params = array( */ function participant_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '2', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -53,13 +53,13 @@ function participant_get_expectedresult(){ 'participant_discount_name' => '', 'participant_campaign_id' => '', 'id' => '1', - 'api.event.get' => array( + 'api.event.get' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 6, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '6', 'title' => 'Annual CiviCRM meet', 'event_title' => 'Annual CiviCRM meet', @@ -89,7 +89,7 @@ function participant_get_expectedresult(){ 'is_multiple_registrations' => 0, 'allow_same_participant_emails' => 0, 'is_template' => 0, - 'created_date' => '2013-02-04 22:37:53', + 'created_date' => '2013-06-22 09:01:44', 'is_share' => '1', ), ), diff --git a/api/v3/examples/ParticipantCreate.php b/api/v3/examples/ParticipantCreate.php index 20036447f9..5506ab3fea 100644 --- a/api/v3/examples/ParticipantCreate.php +++ b/api/v3/examples/ParticipantCreate.php @@ -4,7 +4,7 @@ */ function participant_create_example(){ -$params = array( +$params = array( 'contact_id' => 4, 'event_id' => 1, 'status_id' => 1, @@ -25,13 +25,13 @@ $params = array( */ function participant_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 4, - 'values' => array( - '4' => array( + 'values' => array( + '4' => array( 'id' => '4', 'contact_id' => '4', 'event_id' => '1', diff --git a/api/v3/examples/ParticipantGet.php b/api/v3/examples/ParticipantGet.php index 85e541defd..79bf437500 100644 --- a/api/v3/examples/ParticipantGet.php +++ b/api/v3/examples/ParticipantGet.php @@ -4,7 +4,7 @@ */ function participant_get_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,13 +19,13 @@ $params = array( */ function participant_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '2', 'contact_type' => 'Individual', 'contact_sub_type' => '', diff --git a/api/v3/examples/ParticipantPaymentCreate.php b/api/v3/examples/ParticipantPaymentCreate.php index 9a0847d39c..f6be119603 100644 --- a/api/v3/examples/ParticipantPaymentCreate.php +++ b/api/v3/examples/ParticipantPaymentCreate.php @@ -4,7 +4,7 @@ */ function participant_payment_create_example(){ -$params = array( +$params = array( 'participant_id' => 1, 'contribution_id' => 1, 'version' => 3, @@ -20,13 +20,13 @@ $params = array( */ function participant_payment_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'participant_id' => '1', 'contribution_id' => '1', diff --git a/api/v3/examples/ParticipantPaymentDelete.php b/api/v3/examples/ParticipantPaymentDelete.php index 5148fd6c3c..dbe3135873 100644 --- a/api/v3/examples/ParticipantPaymentDelete.php +++ b/api/v3/examples/ParticipantPaymentDelete.php @@ -4,7 +4,7 @@ */ function participant_payment_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function participant_payment_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/ParticipantPaymentGet.php b/api/v3/examples/ParticipantPaymentGet.php index 6974876c99..455d1470d1 100644 --- a/api/v3/examples/ParticipantPaymentGet.php +++ b/api/v3/examples/ParticipantPaymentGet.php @@ -4,11 +4,10 @@ */ function participant_payment_get_example(){ -$params = array( +$params = array( 'participant_id' => 4, 'contribution_id' => 1, 'version' => 3, - 'debug' => 1, ); $result = civicrm_api( 'participant_payment','get',$params ); @@ -21,27 +20,18 @@ $params = array( */ function participant_payment_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, - 'undefined_fields' => array( - '0' => 'participant_id', - '1' => 'contribution_id', - ), 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'participant_id' => '4', 'contribution_id' => '1', ), ), - 'xdebug' => array( - 'peakMemory' => 34740680, - 'memory' => 33998960, - 'timeIndex' => '79.778831005096', - ), ); return $expectedResult ; diff --git a/api/v3/examples/ParticipantStatusTypeCreate.php b/api/v3/examples/ParticipantStatusTypeCreate.php index 4de013a1aa..086accb61b 100644 --- a/api/v3/examples/ParticipantStatusTypeCreate.php +++ b/api/v3/examples/ParticipantStatusTypeCreate.php @@ -4,7 +4,7 @@ */ function participant_status_type_create_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'test status', 'label' => 'I am a test', @@ -26,13 +26,13 @@ $params = array( */ function participant_status_type_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 14, - 'values' => array( - '14' => array( + 'values' => array( + '14' => array( 'id' => '14', 'name' => 'test status', 'label' => 'I am a test', diff --git a/api/v3/examples/ParticipantStatusTypeDelete.php b/api/v3/examples/ParticipantStatusTypeDelete.php index e6d138e338..21c69628e3 100644 --- a/api/v3/examples/ParticipantStatusTypeDelete.php +++ b/api/v3/examples/ParticipantStatusTypeDelete.php @@ -4,7 +4,7 @@ */ function participant_status_type_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'test status', 'label' => 'I am a test', @@ -26,7 +26,7 @@ $params = array( */ function participant_status_type_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/ParticipantStatusTypeGet.php b/api/v3/examples/ParticipantStatusTypeGet.php index ab7735995a..4272c2b032 100644 --- a/api/v3/examples/ParticipantStatusTypeGet.php +++ b/api/v3/examples/ParticipantStatusTypeGet.php @@ -4,7 +4,7 @@ */ function participant_status_type_get_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'test status', 'label' => 'I am a test', @@ -26,13 +26,13 @@ $params = array( */ function participant_status_type_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 14, - 'values' => array( - '14' => array( + 'values' => array( + '14' => array( 'id' => '14', 'name' => 'test status', 'label' => 'I am a test', diff --git a/api/v3/examples/PaymentProcessorCreate.php b/api/v3/examples/PaymentProcessorCreate.php index 38b7233b90..0a14438360 100644 --- a/api/v3/examples/PaymentProcessorCreate.php +++ b/api/v3/examples/PaymentProcessorCreate.php @@ -4,7 +4,7 @@ */ function payment_processor_create_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'API Test PP', 'payment_processor_type_id' => 1, @@ -23,13 +23,13 @@ $params = array( */ function payment_processor_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'domain_id' => '1', 'name' => 'API Test PP', diff --git a/api/v3/examples/PaymentProcessorDelete.php b/api/v3/examples/PaymentProcessorDelete.php index 4156742071..5ab82e1a70 100644 --- a/api/v3/examples/PaymentProcessorDelete.php +++ b/api/v3/examples/PaymentProcessorDelete.php @@ -4,7 +4,7 @@ */ function payment_processor_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function payment_processor_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/PaymentProcessorTypeCreate.php b/api/v3/examples/PaymentProcessorTypeCreate.php index d7940eed19..37d49d6c0b 100644 --- a/api/v3/examples/PaymentProcessorTypeCreate.php +++ b/api/v3/examples/PaymentProcessorTypeCreate.php @@ -4,7 +4,7 @@ */ function payment_processor_type_create_example(){ -$params = array( +$params = array( 'version' => 3, 'sequential' => 1, 'name' => 'API_Test_PP', @@ -24,13 +24,13 @@ $params = array( */ function payment_processor_type_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'name' => 'API_Test_PP', 'title' => 'API Test Payment Processor', diff --git a/api/v3/examples/PaymentProcessorTypeDelete.php b/api/v3/examples/PaymentProcessorTypeDelete.php index 88a1e578d0..3deaf5ce54 100644 --- a/api/v3/examples/PaymentProcessorTypeDelete.php +++ b/api/v3/examples/PaymentProcessorTypeDelete.php @@ -4,7 +4,7 @@ */ function payment_processor_type_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function payment_processor_type_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/PhoneCreate.php b/api/v3/examples/PhoneCreate.php index cd1c2528d7..c6c79295f3 100644 --- a/api/v3/examples/PhoneCreate.php +++ b/api/v3/examples/PhoneCreate.php @@ -4,12 +4,13 @@ */ function phone_create_example(){ -$params = array( +$params = array( 'contact_id' => 3, 'location_type_id' => 6, 'phone' => '(123) 456-7890', 'is_primary' => 1, 'version' => 3, + 'phone_type_id' => 1, ); $result = civicrm_api( 'phone','create',$params ); @@ -22,13 +23,13 @@ $params = array( */ function phone_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '3', 'location_type_id' => '6', @@ -38,7 +39,7 @@ function phone_create_expectedresult(){ 'phone' => '(123) 456-7890', 'phone_ext' => '', 'phone_numeric' => '', - 'phone_type_id' => '', + 'phone_type_id' => '1', ), ), ); diff --git a/api/v3/examples/PhoneDelete.php b/api/v3/examples/PhoneDelete.php index 7256a5606f..c2df8d4289 100644 --- a/api/v3/examples/PhoneDelete.php +++ b/api/v3/examples/PhoneDelete.php @@ -4,12 +4,13 @@ */ function phone_delete_example(){ -$params = array( +$params = array( 'contact_id' => 4, 'location_type_id' => 7, 'phone' => '(123) 456-7890', 'is_primary' => 1, 'version' => 3, + 'phone_type_id' => 1, ); $result = civicrm_api( 'phone','delete',$params ); @@ -22,11 +23,11 @@ $params = array( */ function phone_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => '1', + 'values' => true, ); return $expectedResult ; diff --git a/api/v3/examples/PhoneGet.php b/api/v3/examples/PhoneGet.php index 1cf8359f32..b8f6c15b0b 100644 --- a/api/v3/examples/PhoneGet.php +++ b/api/v3/examples/PhoneGet.php @@ -4,8 +4,8 @@ */ function phone_get_example(){ -$params = array( - 'contact_id' => '', +$params = array( + 'contact_id' => 8, 'phone' => '(123) 456-7890', 'version' => 3, ); @@ -20,13 +20,13 @@ $params = array( */ function phone_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '8', 'location_type_id' => '11', @@ -34,6 +34,7 @@ function phone_get_expectedresult(){ 'is_billing' => 0, 'phone' => '(123) 456-7890', 'phone_numeric' => '1234567890', + 'phone_type_id' => '1', ), ), ); diff --git a/api/v3/examples/Pledge/GetFilterHighDate.php b/api/v3/examples/Pledge/GetFilterHighDate.php index ce36be86ac..df3d7f8b4a 100644 --- a/api/v3/examples/Pledge/GetFilterHighDate.php +++ b/api/v3/examples/Pledge/GetFilterHighDate.php @@ -4,9 +4,9 @@ demonstrates high date filter */ function pledge_get_example(){ -$params = array( +$params = array( 'version' => 3, - 'pledge_start_date_high' => '20130202223950', + 'pledge_start_date_high' => '20130620090530', ); $result = civicrm_api( 'pledge','get',$params ); @@ -19,13 +19,13 @@ $params = array( */ function pledge_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'contact_id' => '8', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -33,7 +33,7 @@ function pledge_get_expectedresult(){ 'display_name' => 'Mr. Anthony Anderson II', 'pledge_id' => '2', 'pledge_amount' => '100.00', - 'pledge_create_date' => '2013-02-04 00:00:00', + 'pledge_create_date' => '2013-06-22 00:00:00', 'pledge_status' => 'Overdue', 'pledge_total_paid' => '', 'pledge_next_pay_date' => '2012-03-02 00:00:00', diff --git a/api/v3/examples/PledgeCreate.php b/api/v3/examples/PledgeCreate.php index 9e8f4606e3..b90a03fb5f 100644 --- a/api/v3/examples/PledgeCreate.php +++ b/api/v3/examples/PledgeCreate.php @@ -4,11 +4,11 @@ */ function pledge_create_example(){ -$params = array( +$params = array( 'contact_id' => 11, - 'pledge_create_date' => '20130204', - 'start_date' => '20130204', - 'scheduled_date' => '20130206', + 'pledge_create_date' => '20130622', + 'start_date' => '20130622', + 'scheduled_date' => '20130624', 'amount' => '100', 'pledge_status_id' => '2', 'pledge_financial_type_id' => '1', @@ -31,13 +31,13 @@ $params = array( */ function pledge_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'contact_id' => '11', 'financial_type_id' => '1', @@ -49,8 +49,8 @@ function pledge_create_expectedresult(){ 'frequency_interval' => '5', 'frequency_day' => '15', 'installments' => '5', - 'start_date' => '20130204000000', - 'create_date' => '20130204000000', + 'start_date' => '20130622000000', + 'create_date' => '20130622000000', 'acknowledge_date' => '', 'modified_date' => '2012-11-14 16:02:35', 'cancel_date' => '', diff --git a/api/v3/examples/PledgeDelete.php b/api/v3/examples/PledgeDelete.php index 183b149c82..56ef1f5803 100644 --- a/api/v3/examples/PledgeDelete.php +++ b/api/v3/examples/PledgeDelete.php @@ -4,7 +4,7 @@ */ function pledge_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,12 +19,12 @@ $params = array( */ function pledge_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 'id', - 'values' => array( + 'values' => array( 'id' => 1, ), ); diff --git a/api/v3/examples/PledgeGet.php b/api/v3/examples/PledgeGet.php index 95c70d4779..4d532c777e 100644 --- a/api/v3/examples/PledgeGet.php +++ b/api/v3/examples/PledgeGet.php @@ -4,7 +4,7 @@ */ function pledge_get_example(){ -$params = array( +$params = array( 'pledge_id' => 1, 'version' => 3, ); @@ -19,13 +19,13 @@ $params = array( */ function pledge_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '5', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -33,10 +33,10 @@ function pledge_get_expectedresult(){ 'display_name' => 'Mr. Anthony Anderson II', 'pledge_id' => '1', 'pledge_amount' => '100.00', - 'pledge_create_date' => '2013-02-04 00:00:00', + 'pledge_create_date' => '2013-06-22 00:00:00', 'pledge_status' => 'Pending', 'pledge_total_paid' => '', - 'pledge_next_pay_date' => '2013-02-06 00:00:00', + 'pledge_next_pay_date' => '2013-06-24 00:00:00', 'pledge_next_pay_amount' => '20.00', 'pledge_outstanding_amount' => '', 'pledge_financial_type' => 'Donation', diff --git a/api/v3/examples/PledgePaymentCreate.php b/api/v3/examples/PledgePaymentCreate.php index 2661beb507..063c697262 100644 --- a/api/v3/examples/PledgePaymentCreate.php +++ b/api/v3/examples/PledgePaymentCreate.php @@ -4,7 +4,7 @@ */ function pledge_payment_create_example(){ -$params = array( +$params = array( 'contact_id' => 1, 'pledge_id' => 1, 'contribution_id' => 1, @@ -23,13 +23,13 @@ $params = array( */ function pledge_payment_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'pledge_id' => '1', 'contribution_id' => '1', diff --git a/api/v3/examples/PledgePaymentDelete.php b/api/v3/examples/PledgePaymentDelete.php index 1d565c0c74..6fef9b82d0 100644 --- a/api/v3/examples/PledgePaymentDelete.php +++ b/api/v3/examples/PledgePaymentDelete.php @@ -4,7 +4,7 @@ */ function pledge_payment_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,12 +19,12 @@ $params = array( */ function pledge_payment_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 'id', - 'values' => array( + 'values' => array( 'id' => 1, ), ); diff --git a/api/v3/examples/PledgePaymentGet.php b/api/v3/examples/PledgePaymentGet.php index 6ee483c39b..77ffe9fbbb 100644 --- a/api/v3/examples/PledgePaymentGet.php +++ b/api/v3/examples/PledgePaymentGet.php @@ -4,7 +4,7 @@ */ function pledge_payment_get_example(){ -$params = array( +$params = array( 'version' => 3, ); @@ -18,53 +18,53 @@ $params = array( */ function pledge_payment_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 5, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'pledge_id' => '1', 'scheduled_amount' => '20.00', 'currency' => 'USD', - 'scheduled_date' => '2013-02-15 00:00:00', + 'scheduled_date' => '2013-06-22 00:00:00', 'reminder_count' => 0, 'status_id' => '2', ), - '2' => array( + '2' => array( 'id' => '2', 'pledge_id' => '1', 'scheduled_amount' => '20.00', 'currency' => 'USD', - 'scheduled_date' => '2018-02-15 00:00:00', + 'scheduled_date' => '2018-06-22 00:00:00', 'reminder_count' => 0, 'status_id' => '2', ), - '3' => array( + '3' => array( 'id' => '3', 'pledge_id' => '1', 'scheduled_amount' => '20.00', 'currency' => 'USD', - 'scheduled_date' => '2023-02-15 00:00:00', + 'scheduled_date' => '2023-06-22 00:00:00', 'reminder_count' => 0, 'status_id' => '2', ), - '4' => array( + '4' => array( 'id' => '4', 'pledge_id' => '1', 'scheduled_amount' => '20.00', 'currency' => 'USD', - 'scheduled_date' => '2028-02-15 00:00:00', + 'scheduled_date' => '2028-06-22 00:00:00', 'reminder_count' => 0, 'status_id' => '2', ), - '5' => array( + '5' => array( 'id' => '5', 'pledge_id' => '1', 'scheduled_amount' => '20.00', 'currency' => 'USD', - 'scheduled_date' => '2033-02-15 00:00:00', + 'scheduled_date' => '2033-06-22 00:00:00', 'reminder_count' => 0, 'status_id' => '2', ), diff --git a/api/v3/examples/PledgePaymentUpdate.php b/api/v3/examples/PledgePaymentUpdate.php index 298d1b9989..8897f4e78d 100644 --- a/api/v3/examples/PledgePaymentUpdate.php +++ b/api/v3/examples/PledgePaymentUpdate.php @@ -4,7 +4,7 @@ */ function pledge_payment_update_example(){ -$params = array( +$params = array( 'pledge_id' => 1, 'contribution_id' => 1, 'version' => 3, @@ -22,20 +22,20 @@ $params = array( */ function pledge_payment_update_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'pledge_id' => '1', 'contribution_id' => '1', 'scheduled_amount' => '20.00', 'actual_amount' => '20.00', 'currency' => 'USD', - 'scheduled_date' => '2013-02-15 00:00:00', + 'scheduled_date' => '20130622000000', 'reminder_date' => '', 'reminder_count' => 0, 'status_id' => '1', diff --git a/api/v3/examples/PriceFieldCreate.php b/api/v3/examples/PriceFieldCreate.php index fa6c2c57f1..16dac7adcb 100644 --- a/api/v3/examples/PriceFieldCreate.php +++ b/api/v3/examples/PriceFieldCreate.php @@ -4,7 +4,7 @@ */ function price_field_create_example(){ -$params = array( +$params = array( 'version' => 3, 'price_set_id' => 3, 'name' => 'grassvariety', @@ -24,13 +24,13 @@ $params = array( */ function price_field_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'id' => '2', 'price_set_id' => '3', 'name' => 'grassvariety', diff --git a/api/v3/examples/PriceFieldDelete.php b/api/v3/examples/PriceFieldDelete.php index e7c37939f9..58c1bc24d9 100644 --- a/api/v3/examples/PriceFieldDelete.php +++ b/api/v3/examples/PriceFieldDelete.php @@ -4,7 +4,7 @@ */ function price_field_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 4, ); @@ -19,7 +19,7 @@ $params = array( */ function price_field_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/PriceFieldGet.php b/api/v3/examples/PriceFieldGet.php index f2c07bcf61..12a97c7eb6 100644 --- a/api/v3/examples/PriceFieldGet.php +++ b/api/v3/examples/PriceFieldGet.php @@ -4,7 +4,7 @@ */ function price_field_get_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'contribution_amount', ); @@ -19,13 +19,13 @@ $params = array( */ function price_field_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'price_set_id' => '1', 'name' => 'contribution_amount', diff --git a/api/v3/examples/PriceFieldValueCreate.php b/api/v3/examples/PriceFieldValueCreate.php index b63363c792..21e6cb2821 100644 --- a/api/v3/examples/PriceFieldValueCreate.php +++ b/api/v3/examples/PriceFieldValueCreate.php @@ -4,7 +4,7 @@ */ function price_field_value_create_example(){ -$params = array( +$params = array( 'version' => 3, 'price_field_id' => 13, 'membership_type_id' => 5, @@ -26,13 +26,13 @@ $params = array( */ function price_field_value_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 10, - 'values' => array( - '10' => array( + 'values' => array( + '10' => array( 'id' => '10', 'price_field_id' => '13', 'name' => 'memType1', @@ -48,6 +48,7 @@ function price_field_value_create_expectedresult(){ 'is_active' => '1', 'financial_type_id' => '2', 'deductible_amount' => '', + 'contribution_type_id' => '2', ), ), ); diff --git a/api/v3/examples/PriceFieldValueDelete.php b/api/v3/examples/PriceFieldValueDelete.php index 624e5ae19d..6d0fc244cb 100644 --- a/api/v3/examples/PriceFieldValueDelete.php +++ b/api/v3/examples/PriceFieldValueDelete.php @@ -4,7 +4,7 @@ */ function price_field_value_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 7, ); @@ -19,7 +19,7 @@ $params = array( */ function price_field_value_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/PriceFieldValueGet.php b/api/v3/examples/PriceFieldValueGet.php index b7ec6ceab4..8b21d15266 100644 --- a/api/v3/examples/PriceFieldValueGet.php +++ b/api/v3/examples/PriceFieldValueGet.php @@ -4,7 +4,7 @@ */ function price_field_value_get_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'contribution_amount', ); @@ -19,13 +19,13 @@ $params = array( */ function price_field_value_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'price_field_id' => '1', 'name' => 'contribution_amount', diff --git a/api/v3/examples/PriceSetCreate.php b/api/v3/examples/PriceSetCreate.php index 1b90f31606..7fff23c625 100644 --- a/api/v3/examples/PriceSetCreate.php +++ b/api/v3/examples/PriceSetCreate.php @@ -4,7 +4,7 @@ */ function price_set_create_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'default_goat_priceset', 'title' => 'Goat accessories', @@ -27,13 +27,13 @@ $params = array( */ function price_set_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 15, - 'values' => array( - '15' => array( + 'values' => array( + '15' => array( 'id' => '15', 'domain_id' => '', 'name' => 'default_goat_priceset', diff --git a/api/v3/examples/PriceSetDelete.php b/api/v3/examples/PriceSetDelete.php index 13ee7d3dc8..741d4d322f 100644 --- a/api/v3/examples/PriceSetDelete.php +++ b/api/v3/examples/PriceSetDelete.php @@ -4,7 +4,7 @@ */ function price_set_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 17, ); @@ -19,7 +19,7 @@ $params = array( */ function price_set_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/PriceSetGet.php b/api/v3/examples/PriceSetGet.php index b76624bd1d..dcfc788986 100644 --- a/api/v3/examples/PriceSetGet.php +++ b/api/v3/examples/PriceSetGet.php @@ -4,7 +4,7 @@ */ function price_set_get_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'default_contribution_amount', ); @@ -19,13 +19,13 @@ $params = array( */ function price_set_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'name' => 'default_contribution_amount', 'title' => 'Contribution Amount', diff --git a/api/v3/examples/PriceSetSet.php b/api/v3/examples/PriceSetSet.php index 67a484570f..a8ba0e23a7 100644 --- a/api/v3/examples/PriceSetSet.php +++ b/api/v3/examples/PriceSetSet.php @@ -4,7 +4,7 @@ */ function price_set_set_example(){ -$params = array( +$params = array( 'version' => 3, 'entity_table' => 'civicrm_event', 'entity_id' => 1, @@ -23,13 +23,13 @@ $params = array( */ function price_set_set_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 16, - 'values' => array( - '16' => array( + 'values' => array( + '16' => array( 'id' => '16', 'domain_id' => '', 'name' => 'event price', diff --git a/api/v3/examples/ProfileApply.php b/api/v3/examples/ProfileApply.php index 6bf994310d..0363c2a3ca 100644 --- a/api/v3/examples/ProfileApply.php +++ b/api/v3/examples/ProfileApply.php @@ -4,7 +4,7 @@ */ function profile_apply_example(){ -$params = array( +$params = array( 'profile_id' => 25, 'contact_id' => 1, 'version' => 3, @@ -26,11 +26,11 @@ $params = array( */ function profile_apply_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 10, - 'values' => array( + 'values' => array( 'contact_type' => 'Individual', 'contact_sub_type' => '', 'contact_id' => 1, @@ -38,23 +38,23 @@ function profile_apply_expectedresult(){ 'version' => 3, 'first_name' => 'abc2', 'last_name' => 'xyz2', - 'email' => array( - '1' => array( + 'email' => array( + '1' => array( 'location_type_id' => '1', 'is_primary' => 1, 'email' => 'abc2.xyz2@gmail.com', ), ), - 'phone' => array( - '2' => array( + 'phone' => array( + '2' => array( 'location_type_id' => '1', 'is_primary' => 1, 'phone_type_id' => '1', 'phone' => '022 321 826', ), ), - 'address' => array( - '1' => array( + 'address' => array( + '1' => array( 'location_type_id' => '1', 'is_primary' => 1, 'country_id' => '1013', diff --git a/api/v3/examples/ProfileGet.php b/api/v3/examples/ProfileGet.php index bb6f4f75c1..6699c3310f 100644 --- a/api/v3/examples/ProfileGet.php +++ b/api/v3/examples/ProfileGet.php @@ -4,7 +4,7 @@ */ function profile_get_example(){ -$params = array( +$params = array( 'profile_id' => 25, 'contact_id' => 1, 'version' => 3, @@ -20,11 +20,11 @@ $params = array( */ function profile_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => array( + 'values' => array( 'first_name' => 'abc1', 'last_name' => 'xyz1', 'email-Primary' => 'abc1.xyz1@yahoo.com', diff --git a/api/v3/examples/ProfileSet.php b/api/v3/examples/ProfileSet.php index 9752e5d1ce..cb67f48975 100644 --- a/api/v3/examples/ProfileSet.php +++ b/api/v3/examples/ProfileSet.php @@ -4,7 +4,7 @@ */ function profile_set_example(){ -$params = array( +$params = array( 'profile_id' => 25, 'contact_id' => 1, 'version' => 3, @@ -26,13 +26,13 @@ $params = array( */ function profile_set_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -61,13 +61,13 @@ function profile_set_expectedresult(){ 'suffix_id' => '', 'email_greeting_id' => '1', 'email_greeting_custom' => '', - 'email_greeting_display' => 'Dear abc1', + 'email_greeting_display' => 'Dear', 'postal_greeting_id' => '1', 'postal_greeting_custom' => '', - 'postal_greeting_display' => 'Dear abc1', + 'postal_greeting_display' => 'Dear', 'addressee_id' => '1', 'addressee_custom' => '', - 'addressee_display' => 'abc1 xyz1', + 'addressee_display' => '', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -78,7 +78,7 @@ function profile_set_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'user_unique_id' => '', - 'created_date' => '2013-02-05 11:40:49', + 'created_date' => '20120130621222105', 'modified_date' => '2012-11-14 16:02:35', ), ), diff --git a/api/v3/examples/RelationshipTypeCreate.php b/api/v3/examples/RelationshipTypeCreate.php index dabbc3b217..4f3135605c 100644 --- a/api/v3/examples/RelationshipTypeCreate.php +++ b/api/v3/examples/RelationshipTypeCreate.php @@ -4,7 +4,7 @@ */ function relationship_type_create_example(){ -$params = array( +$params = array( 'name_a_b' => 'Relation 1 for relationship type create', 'name_b_a' => 'Relation 2 for relationship type create', 'contact_type_a' => 'Individual', @@ -25,13 +25,13 @@ $params = array( */ function relationship_type_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'name_a_b' => 'Relation 1 for relationship type create', 'label_a_b' => 'Relation 1 for relationship type create', diff --git a/api/v3/examples/RelationshipTypeDelete.php b/api/v3/examples/RelationshipTypeDelete.php index 47902b193e..522cff97be 100644 --- a/api/v3/examples/RelationshipTypeDelete.php +++ b/api/v3/examples/RelationshipTypeDelete.php @@ -4,7 +4,7 @@ */ function relationship_type_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function relationship_type_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/Setting/CreateAllDomains.php b/api/v3/examples/Setting/CreateAllDomains.php index 62de561da0..78351d2ded 100644 --- a/api/v3/examples/Setting/CreateAllDomains.php +++ b/api/v3/examples/Setting/CreateAllDomains.php @@ -4,7 +4,7 @@ shows setting a variable for all domains */ function setting_create_example(){ -$params = array( +$params = array( 'version' => 3, 'domain_id' => 'all', 'uniq_email_per_site' => 1, @@ -20,18 +20,18 @@ $params = array( */ function setting_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 3, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'uniq_email_per_site' => '1', ), - '2' => array( + '2' => array( 'uniq_email_per_site' => '1', ), - '3' => array( + '3' => array( 'uniq_email_per_site' => '1', ), ), diff --git a/api/v3/examples/Setting/CreateSettingCurrentDomain.php b/api/v3/examples/Setting/CreateSettingCurrentDomain.php index e236b2a381..d41cd0383c 100644 --- a/api/v3/examples/Setting/CreateSettingCurrentDomain.php +++ b/api/v3/examples/Setting/CreateSettingCurrentDomain.php @@ -4,7 +4,7 @@ shows setting a variable for a current domain */ function setting_create_example(){ -$params = array( +$params = array( 'version' => 3, 'uniq_email_per_site' => 1, ); @@ -19,13 +19,13 @@ $params = array( */ function setting_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'uniq_email_per_site' => '1', ), ), diff --git a/api/v3/examples/Setting/CreateSpecifiedDomains.php b/api/v3/examples/Setting/CreateSpecifiedDomains.php index 39dfe4fa5c..df11acabfb 100644 --- a/api/v3/examples/Setting/CreateSpecifiedDomains.php +++ b/api/v3/examples/Setting/CreateSpecifiedDomains.php @@ -4,9 +4,9 @@ shows setting a variable for specified domains */ function setting_create_example(){ -$params = array( +$params = array( 'version' => 3, - 'domain_id' => array( + 'domain_id' => array( '0' => 1, '1' => 3, ), @@ -23,15 +23,15 @@ $params = array( */ function setting_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 2, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'uniq_email_per_site' => 0, ), - '3' => array( + '3' => array( 'uniq_email_per_site' => 0, ), ), diff --git a/api/v3/examples/Setting/GetAllDomains.php b/api/v3/examples/Setting/GetAllDomains.php index e8657d8501..bf363cc43c 100644 --- a/api/v3/examples/Setting/GetAllDomains.php +++ b/api/v3/examples/Setting/GetAllDomains.php @@ -4,7 +4,7 @@ shows getting a variable for all domains */ function setting_get_example(){ -$params = array( +$params = array( 'version' => 3, 'domain_id' => 'all', 'return' => 'uniq_email_per_site', @@ -20,18 +20,18 @@ $params = array( */ function setting_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 3, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'uniq_email_per_site' => '1', ), - '2' => array( + '2' => array( 'uniq_email_per_site' => '1', ), - '3' => array( + '3' => array( 'uniq_email_per_site' => '1', ), ), diff --git a/api/v3/examples/Setting/GetDefaults.php b/api/v3/examples/Setting/GetDefaults.php index 6e20ae6712..4b5efa7526 100644 --- a/api/v3/examples/Setting/GetDefaults.php +++ b/api/v3/examples/Setting/GetDefaults.php @@ -4,7 +4,7 @@ gets defaults setting a variable for a given domain - if no domain is set current is assumed */ function setting_getdefaults_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'address_format', ); @@ -19,13 +19,13 @@ $params = array( */ function setting_getdefaults_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'address_format' => '{contact.address_name} {contact.street_address} {contact.supplemental_address_1} diff --git a/api/v3/examples/Setting/GetSettingCurrentDomain.php b/api/v3/examples/Setting/GetSettingCurrentDomain.php index 9e1ef887ba..d619b4ad02 100644 --- a/api/v3/examples/Setting/GetSettingCurrentDomain.php +++ b/api/v3/examples/Setting/GetSettingCurrentDomain.php @@ -4,7 +4,7 @@ shows getting a variable for a current domain */ function setting_get_example(){ -$params = array( +$params = array( 'version' => 3, 'return' => 'uniq_email_per_site', ); @@ -19,13 +19,13 @@ $params = array( */ function setting_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'uniq_email_per_site' => 0, ), ), diff --git a/api/v3/examples/Setting/GetSpecifiedDomains.php b/api/v3/examples/Setting/GetSpecifiedDomains.php index 0db018f821..9389205ee0 100644 --- a/api/v3/examples/Setting/GetSpecifiedDomains.php +++ b/api/v3/examples/Setting/GetSpecifiedDomains.php @@ -4,13 +4,13 @@ shows getting a variable for specified domains */ function setting_get_example(){ -$params = array( +$params = array( 'version' => 3, - 'domain_id' => array( + 'domain_id' => array( '0' => 1, '1' => 2, ), - 'return' => array( + 'return' => array( '0' => 'uniq_email_per_site', ), ); @@ -25,15 +25,15 @@ $params = array( */ function setting_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 2, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'uniq_email_per_site' => 0, ), - '2' => array( + '2' => array( 'uniq_email_per_site' => '1', ), ), diff --git a/api/v3/examples/SettingCreate.php b/api/v3/examples/SettingCreate.php index 4a09a341e4..1aa00f62c5 100644 --- a/api/v3/examples/SettingCreate.php +++ b/api/v3/examples/SettingCreate.php @@ -4,7 +4,7 @@ */ function setting_create_example(){ -$params = array( +$params = array( 'version' => 3, 'domain_id' => 2, 'uniq_email_per_site' => 1, @@ -20,13 +20,13 @@ $params = array( */ function setting_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'uniq_email_per_site' => '1', ), ), diff --git a/api/v3/examples/SettingGet.php b/api/v3/examples/SettingGet.php index 9d4054c347..ec76f9a9a7 100644 --- a/api/v3/examples/SettingGet.php +++ b/api/v3/examples/SettingGet.php @@ -4,7 +4,7 @@ */ function setting_get_example(){ -$params = array( +$params = array( 'version' => 3, 'domain_id' => 2, 'return' => 'uniq_email_per_site', @@ -20,13 +20,13 @@ $params = array( */ function setting_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'uniq_email_per_site' => '1', ), ), diff --git a/api/v3/examples/SettingGetValue.php b/api/v3/examples/SettingGetValue.php index 3cdf3a206d..8afd44908d 100644 --- a/api/v3/examples/SettingGetValue.php +++ b/api/v3/examples/SettingGetValue.php @@ -4,7 +4,7 @@ Demonstrates getvalue action - intended for runtime use as better caching than get */ function setting_getvalue_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'petition_contacts', 'group' => 'Campaign Preferences', diff --git a/api/v3/examples/SettingGetfields.php b/api/v3/examples/SettingGetfields.php index c303a49739..5e84f1c12f 100644 --- a/api/v3/examples/SettingGetfields.php +++ b/api/v3/examples/SettingGetfields.php @@ -4,7 +4,7 @@ Demonstrate return from getfields - see subfolder for variants */ function setting_getfields_example(){ -$params = array( +$params = array( 'version' => 3, ); @@ -18,12 +18,12 @@ $params = array( */ function setting_getfields_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 73, - 'values' => array( - 'address_standardization_provider' => array( + 'count' => 75, + 'values' => array( + 'address_standardization_provider' => array( 'group_name' => 'Address Preferences', 'group' => 'address', 'name' => 'address_standardization_provider', @@ -37,7 +37,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => 'CiviCRM includes an optional plugin for interfacing with the United States Postal Services (USPS) Address Standardization web service. You must register to use the USPS service at https://www.usps.com/business/webtools-address-information.htm. If you are approved, they will provide you with a User ID and the URL for the service. Plugins for other address standardization services may be available from 3rd party developers. If installed, they will be included in the drop-down below. ', ), - 'address_standardization_userid' => array( + 'address_standardization_userid' => array( 'group_name' => 'Address Preferences', 'group' => 'address', 'name' => 'address_standardization_userid', @@ -51,7 +51,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'address_standardization_url' => array( + 'address_standardization_url' => array( 'group_name' => 'Address Preferences', 'group' => 'address', 'name' => 'address_standardization_url', @@ -66,7 +66,7 @@ function setting_getfields_expectedresult(){ 'help_text' => 'Web service URL.', 'validate_callback' => 'CRM_Utils_Rule::url', ), - 'tag_unconfirmed' => array( + 'tag_unconfirmed' => array( 'group_name' => 'Campaign Preferences', 'group' => 'campaign', 'name' => 'tag_unconfirmed', @@ -80,7 +80,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.', ), - 'petition_contacts' => array( + 'petition_contacts' => array( 'group_name' => 'Campaign Preferences', 'group' => 'campaign', 'name' => 'petition_contacts', @@ -94,7 +94,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.', ), - 'cvv_backoffice_required' => array( + 'cvv_backoffice_required' => array( 'group_name' => 'Contribute Preferences', 'group' => 'contribute', 'name' => 'cvv_backoffice_required', @@ -108,16 +108,16 @@ function setting_getfields_expectedresult(){ 'description' => 'Is the CVV code required for back office credit card transactions', 'help_text' => 'If set it back-office credit card transactions will required a cvv code. Leave as required unless you have a very strong reason to change', ), - 'contact_view_options' => array( + 'contact_view_options' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'contact_view_options', 'type' => 'String', 'html_type' => 'checkboxes', - 'pseudoconstant' => array( + 'pseudoconstant' => array( 'optionGroupName' => 'contact_view_options', ), - 'default' => array( + 'default' => array( '0' => '1', '1' => '2', '2' => '3', @@ -138,16 +138,16 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'contact_edit_options' => array( + 'contact_edit_options' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'contact_edit_options', 'type' => 'String', 'html_type' => 'checkboxes', - 'pseudoconstant' => array( + 'pseudoconstant' => array( 'optionGroupName' => 'contact_edit_options', ), - 'default' => array( + 'default' => array( '0' => '1', '1' => '2', '2' => '3', @@ -167,15 +167,15 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'advanced_search_options' => array( + 'advanced_search_options' => array( 'group_name' => 'CiviCRM Preferences', 'name' => 'advanced_search_options', 'type' => 'String', 'html_type' => 'checkboxes', - 'pseudoconstant' => array( + 'pseudoconstant' => array( 'optionGroupName' => 'advanced_search_options', ), - 'default' => array( + 'default' => array( '0' => '1', '1' => '2', '2' => '3', @@ -201,16 +201,16 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'user_dashboard_options' => array( + 'user_dashboard_options' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'user_dashboard_options', 'type' => 'String', 'html_type' => 'checkboxes', - 'pseudoconstant' => array( + 'pseudoconstant' => array( 'optionGroupName' => 'user_dashboard_options', ), - 'default' => array( + 'default' => array( '0' => '1', '1' => '2', '2' => '3', @@ -227,16 +227,16 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'address_options' => array( + 'address_options' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'address_options', 'type' => 'String', 'html_type' => 'Text', - 'pseudoconstant' => array( + 'pseudoconstant' => array( 'optionGroupName' => 'address_options', ), - 'default' => array( + 'default' => array( '0' => '1', '1' => '2', '2' => '4', @@ -253,7 +253,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'address_format' => array( + 'address_format' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'address_format', @@ -272,7 +272,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'mailing_format' => array( + 'mailing_format' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'mailing_format', @@ -291,7 +291,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'display_name_format' => array( + 'display_name_format' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'display_name_format', @@ -305,7 +305,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'sort_name_format' => array( + 'sort_name_format' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'sort_name_format', @@ -319,7 +319,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'editor_id' => array( + 'editor_id' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'editor_id', @@ -333,7 +333,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'contact_ajax_check_similar' => array( + 'contact_ajax_check_similar' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'contact_ajax_check_similar', @@ -347,7 +347,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'activity_assignee_notification' => array( + 'activity_assignee_notification' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'activity_assignee_notification', @@ -361,7 +361,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'activity_assignee_notification_ics' => array( + 'activity_assignee_notification_ics' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'activity_assignee_notification_ics', @@ -375,16 +375,16 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'contact_autocomplete_options' => array( + 'contact_autocomplete_options' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'contact_autocomplete_options', 'type' => 'String', 'html_type' => 'checkboxes', - 'pseudoconstant' => array( + 'pseudoconstant' => array( 'optionGroupName' => 'contact_autocomplete_options', ), - 'default' => array( + 'default' => array( '0' => '1', '1' => '2', '2' => '3', @@ -400,16 +400,16 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'contact_reference_options' => array( + 'contact_reference_options' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'contact_reference_options', 'type' => 'String', 'html_type' => 'checkboxes', - 'pseudoconstant' => array( + 'pseudoconstant' => array( 'optionGroupName' => 'contact_reference_options', ), - 'default' => array( + 'default' => array( '0' => '1', '1' => '2', '2' => '3', @@ -425,7 +425,7 @@ function setting_getfields_expectedresult(){ 'description' => '', 'help_text' => '', ), - 'max_attachments' => array( + 'max_attachments' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'max_attachments', @@ -434,7 +434,7 @@ function setting_getfields_expectedresult(){ 'type' => 'Integer', 'quick_form_type' => 'Element', 'html_type' => 'text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 2, 'maxlength' => 8, ), @@ -446,7 +446,7 @@ function setting_getfields_expectedresult(){ 'description' => 'Maximum number of files (documents, images, etc.) which can attached to emails or activities.', 'help_text' => '', ), - 'maxFileSize' => array( + 'maxFileSize' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'maxFileSize', @@ -455,7 +455,7 @@ function setting_getfields_expectedresult(){ 'type' => 'Integer', 'quick_form_type' => 'Element', 'html_type' => 'text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 2, 'maxlength' => 8, ), @@ -467,7 +467,7 @@ function setting_getfields_expectedresult(){ 'description' => 'Maximum Size of file (documents, images, etc.) which can attached to emails or activities.
Note: php.ini should support this file size.', 'help_text' => '', ), - 'contact_undelete' => array( + 'contact_undelete' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'contact_undelete', @@ -481,7 +481,21 @@ function setting_getfields_expectedresult(){ 'description' => 'If enabled, deleted contacts will be moved to trash (instead of being destroyed). Users with the proper permission are able to search for the deleted contacts and restore them (or delete permanently).', 'help_text' => '', ), - 'versionCheck' => array( + 'versionAlert' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'versionAlert', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 1, + 'add' => '4.3', + 'title' => 'New Version Alerts', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Displays an on-screen alert to users with "Administer CiviCRM" permissions when a new version of CiviCRM is available. This setting will only work if the "Version Check & Statistics Reporting" setting is enabled.', + 'help_text' => '', + ), + 'versionCheck' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'versionCheck', @@ -498,7 +512,7 @@ function setting_getfields_expectedresult(){ When enabled, statistics about your CiviCRM installation are reported anonymously to the CiviCRM team to assist in prioritizing ongoing development efforts. The following information is gathered: CiviCRM version, versions of PHP, MySQL and framework (Drupal/Joomla/standalone), and default language. Counts (but no actual data) of the following record types are reported: contacts, activities, cases, relationships, contributions, contribution pages, contribution products, contribution widgets, discounts, price sets, profiles, events, participants, tell-a-friend pages, grants, mailings, memberships, membership blocks, pledges, pledge blocks and active payment processor types.', 'help_text' => '', ), - 'doNotAttachPDFReceipt' => array( + 'doNotAttachPDFReceipt' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'doNotAttachPDFReceipt', @@ -514,7 +528,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => 'If enabled, CiviCRM sends PDF receipt as an attachment during event signup or online contribution.', 'help_text' => '', ), - 'wkhtmltopdfPath' => array( + 'wkhtmltopdfPath' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'wkhtmltopdfPath', @@ -523,7 +537,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'Text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 64, 'maxlength' => 256, ), @@ -535,7 +549,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => '', 'help_text' => '', ), - 'recaptchaPublicKey' => array( + 'recaptchaPublicKey' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'recaptchaPublicKey', @@ -544,7 +558,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'Text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 64, 'maxlength' => 64, ), @@ -556,7 +570,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => '', 'help_text' => '', ), - 'recaptchaPrivateKey' => array( + 'recaptchaPrivateKey' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'recaptchaPrivateKey', @@ -565,7 +579,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'Text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 64, 'maxlength' => 64, ), @@ -577,7 +591,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => '', 'help_text' => '', ), - 'dashboardCacheTimeout' => array( + 'dashboardCacheTimeout' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'dashboardCacheTimeout', @@ -586,7 +600,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'type' => 'Integer', 'quick_form_type' => 'Element', 'html_type' => 'Text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 3, 'maxlength' => 5, ), @@ -598,7 +612,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => '', 'help_text' => '', ), - 'checksumTimeout' => array( + 'checksumTimeout' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'checksumTimeout', @@ -607,7 +621,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'type' => 'Integer', 'quick_form_type' => 'Element', 'html_type' => 'Text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 2, 'maxlength' => 8, ), @@ -619,7 +633,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => '', 'help_text' => '', ), - 'communityMessagesUrl' => array( + 'communityMessagesUrl' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'communityMessagesUrl', @@ -628,7 +642,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'Text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 64, 'maxlength' => 128, ), @@ -640,7 +654,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => 'Service providing CiviCRM community messages', 'help_text' => 'Use "*default*" for the system default or override with a custom URL', ), - 'resCacheCode' => array( + 'resCacheCode' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'resCacheCode', @@ -649,7 +663,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'Text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 16, 'maxlength' => 16, ), @@ -661,7 +675,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => 'Code appended to resource URLs (JS/CSS) to coerce HTTP caching', 'help_text' => '', ), - 'verifySSL' => array( + 'verifySSL' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'verifySSL', @@ -675,7 +689,23 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => 'If disabled, backend HTTPS services will allow unverified, insecure connections', 'help_text' => 'Unless you are absolutely unable to configure your server to check the SSL certificate of the remote server you should leave this set to Yes', ), - 'debug_enabled' => array( + 'wpBasePage' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'wpBasePage', + 'type' => 'String', + 'html_type' => 'text', + 'quick_form_type' => 'Element', + 'prefetch' => 1, + 'default' => '', + 'add' => '4.3', + 'title' => 'WordPress Base Page', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If set, CiviCRM will use this setting as the base url.', + 'help_text' => 'By default, CiviCRM will generate front-facing pages using the home page at http://wp/ as its base. If you want to use a different template for CiviCRM pages, set the path here.', + ), + 'debug_enabled' => array( 'group_name' => 'Developer Preferences', 'group' => 'developer', 'name' => 'debug_enabled', @@ -688,11 +718,11 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'title' => 'Enable Debugging', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Set this value to Yes if you want to use one of CiviCRM\'s debugging tools. This feature should NOT be enabled for production sites', + 'description' => 'Set this value to Yes if you want to use one of CiviCRM's debugging tools. This feature should NOT be enabled for production sites', 'prefetch' => 1, 'help_text' => 'Do not turn this on on production sites', ), - 'userFrameworkLogging' => array( + 'userFrameworkLogging' => array( 'group_name' => 'Developer Preferences', 'group' => 'developer', 'name' => 'userFrameworkLogging', @@ -706,10 +736,10 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'is_contact' => 0, 'description' => 'Set this value to Yes if you want CiviCRM error/debugging messages to also appear in Drupal error logs', 'prefetch' => 1, - 'help_text' => 'Set this value to Yes if you want CiviCRM error/debugging messages the appear in your CMS\' error log. -In the case of Drupal, this will cause all CiviCRM error messages to appear in the watchdog (assuming you have Drupal\'s watchdog enabled)', + 'help_text' => 'Set this value to Yes if you want CiviCRM error/debugging messages the appear in your CMS' error log. +In the case of Drupal, this will cause all CiviCRM error messages to appear in the watchdog (assuming you have Drupal's watchdog enabled)', ), - 'backtrace' => array( + 'backtrace' => array( 'group_name' => 'Developer Preferences', 'group' => 'developer', 'name' => 'backtrace', @@ -724,7 +754,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'Set this value to Yes if you want to display a backtrace listing when a fatal error is encountered. This feature should NOT be enabled for production sites', 'prefetch' => 1, ), - 'fatalErrorTemplate' => array( + 'fatalErrorTemplate' => array( 'group_name' => 'Developer Preferences', 'group' => 'developer', 'name' => 'fatalErrorTemplate', @@ -739,7 +769,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'Enter the path and filename for a custom Smarty template if you want to define your own screen for displaying fatal errors.', 'prefetch' => 1, ), - 'fatalErrorHandler' => array( + 'fatalErrorHandler' => array( 'group_name' => 'Developer Preferences', 'group' => 'developer', 'name' => 'fatalErrorHandler', @@ -754,7 +784,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'Enter the path and class for a custom PHP error-handling function if you want to override built-in CiviCRM error handling for your site.', 'prefetch' => 1, ), - 'uploadDir' => array( + 'uploadDir' => array( 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'uploadDir', @@ -769,7 +799,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.', ), - 'imageUploadDir' => array( + 'imageUploadDir' => array( 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'imageUploadDir', @@ -784,7 +814,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'customFileUploadDir' => array( + 'customFileUploadDir' => array( 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'customFileUploadDir', @@ -799,7 +829,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'customTemplateDir' => array( + 'customTemplateDir' => array( 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'customTemplateDir', @@ -814,7 +844,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'customPHPPathDir' => array( + 'customPHPPathDir' => array( 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'customPHPPathDir', @@ -829,7 +859,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'extensionsDir' => array( + 'extensionsDir' => array( 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'extensionsDir', @@ -844,7 +874,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'event_enable_cart' => array( + 'event_enable_cart' => array( 'name' => 'enable_cart', 'group_name' => 'Event Preferences', 'group' => 'event', @@ -858,7 +888,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'WRITE ME', 'help_text' => 'WRITE ME', ), - 'monetaryThousandSeparator' => array( + 'monetaryThousandSeparator' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'monetaryThousandSeparator', @@ -867,7 +897,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 2, ), 'default' => ',', @@ -878,7 +908,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'monetaryDecimalPoint' => array( + 'monetaryDecimalPoint' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'monetaryDecimalPoint', @@ -887,7 +917,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 2, ), 'default' => '.', @@ -898,7 +928,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'moneyformat' => array( + 'moneyformat' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'moneyformat', @@ -915,7 +945,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'moneyvalueformat' => array( + 'moneyvalueformat' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'moneyvalueformat', @@ -932,7 +962,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'defaultCurrency' => array( + 'defaultCurrency' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'defaultCurrency', @@ -941,7 +971,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 2, ), 'default' => 'USD', @@ -952,7 +982,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'Default currency assigned to contributions and other monetary transactions.', 'help_text' => '', ), - 'countryLimit' => array( + 'countryLimit' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'countryLimit', @@ -961,7 +991,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'type' => 'Array', 'quick_form_type' => 'Element', 'html_type' => 'advmultiselect', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 5, 'style' => 'width:150px', 'class' => 'advmultiselect', @@ -974,7 +1004,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'provinceLimit' => array( + 'provinceLimit' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'provinceLimit', @@ -983,7 +1013,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'type' => 'Array', 'quick_form_type' => 'Element', 'html_type' => 'advmultiselect', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 5, 'style' => 'width:150px', 'class' => 'advmultiselect', @@ -996,7 +1026,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'inheritLocale' => array( + 'inheritLocale' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'inheritLocale', @@ -1012,7 +1042,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'dateformatDatetime' => array( + 'dateformatDatetime' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'dateformatDatetime', @@ -1027,7 +1057,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'dateformatFull' => array( + 'dateformatFull' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'dateformatFull', @@ -1042,7 +1072,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'dateformatPartial' => array( + 'dateformatPartial' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'dateformatPartial', @@ -1057,7 +1087,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'lcMessages' => array( + 'lcMessages' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'lcMessages', @@ -1072,7 +1102,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'profile_double_optin' => array( + 'profile_double_optin' => array( 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'profile_double_optin', @@ -1086,7 +1116,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'When CiviMail is enabled, users who "subscribe" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.', 'help_text' => '', ), - 'track_civimail_replies' => array( + 'track_civimail_replies' => array( 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'track_civimail_replies', @@ -1101,7 +1131,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'help_text' => '', 'validate_callback' => 'CRM_Core_BAO_Setting::validateBoolSetting', ), - 'civimail_workflow' => array( + 'civimail_workflow' => array( 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'civimail_workflow', @@ -1115,7 +1145,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'When CiviMail is enabled, users who "subscribe" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.', 'help_text' => '', ), - 'civimail_server_wide_lock' => array( + 'civimail_server_wide_lock' => array( 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'civimail_server_wide_lock', @@ -1129,7 +1159,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'mailing_backend' => array( + 'mailing_backend' => array( 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'mailing_backend', @@ -1143,7 +1173,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'profile_add_to_group_double_optin' => array( + 'profile_add_to_group_double_optin' => array( 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'profile_add_to_group_double_optin', @@ -1157,14 +1187,14 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'When CiviMail is enabled, users who "subscribe" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.', 'help_text' => '', ), - 'default_renewal_contribution_page' => array( + 'default_renewal_contribution_page' => array( 'group_name' => 'Member Preferences', 'group' => 'member', 'name' => 'default_renewal_contribution_page', 'type' => 'Integer', 'html_type' => 'Select', 'default' => '', - 'pseudoconstant' => array( + 'pseudoconstant' => array( 'name' => 'contributionPage', ), 'add' => '4.1', @@ -1174,7 +1204,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'If you select a default online contribution page for self-service membership renewals, a "renew" link pointing to that page will be displayed on the Contact Dashboard for memberships which were entered offline. You will need to ensure that the membership block for the selected online contribution page includes any currently available memberships.', 'help_text' => '', ), - 'is_enabled' => array( + 'is_enabled' => array( 'group_name' => 'Multi Site Preferences', 'group' => 'multisite', 'name' => 'is_enabled', @@ -1186,7 +1216,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'Multisite is enabled', 'help_text' => '', ), - 'domain_group_id' => array( + 'domain_group_id' => array( 'group_name' => 'Multi Site Preferences', 'group' => 'multisite', 'name' => 'domain_group_id', @@ -1198,7 +1228,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'event_price_set_domain_id' => array( + 'event_price_set_domain_id' => array( 'group_name' => 'Multi Site Preferences', 'group' => 'multisite', 'name' => 'event_price_set_domain_id', @@ -1210,7 +1240,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'uniq_email_per_site' => array( + 'uniq_email_per_site' => array( 'group_name' => 'Multi Site Preferences', 'group' => 'multisite', 'name' => 'uniq_email_per_site', @@ -1222,7 +1252,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => '', 'help_text' => '', ), - 'search_autocomplete_count' => array( + 'search_autocomplete_count' => array( 'group_name' => 'Search Preferences', 'group' => 'Search Preferences', 'name' => 'search_autocomplete_count', @@ -1230,7 +1260,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'type' => 'Integer', 'quick_form_type' => 'Element', 'html_type' => 'text', - 'html_attributes' => array( + 'html_attributes' => array( 'size' => 2, 'maxlength' => 2, ), @@ -1242,7 +1272,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'description' => 'The maximum number of contacts to show at a time when typing in an autocomplete field.', 'help_text' => '', ), - 'userFrameworkResourceURL' => array( + 'userFrameworkResourceURL' => array( 'group' => 'UrlPreferences', 'group_name' => 'url', 'name' => 'userFrameworkResourceURL', @@ -1256,7 +1286,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'help_text' => '', 'validate_callback' => 'CRM_Utils_Rule::url', ), - 'imageUploadURL' => array( + 'imageUploadURL' => array( 'group' => 'UrlPreferences', 'group_name' => 'url', 'name' => 'imageUploadURL', @@ -1270,7 +1300,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'help_text' => '', 'validate_callback' => 'CRM_Utils_Rule::url', ), - 'customCSSURL' => array( + 'customCSSURL' => array( 'group' => 'UrlPreferences', 'group_name' => 'url', 'name' => 'customCSSURL', diff --git a/api/v3/examples/SettingRevert.php b/api/v3/examples/SettingRevert.php index 144d1fe551..509c0ca111 100644 --- a/api/v3/examples/SettingRevert.php +++ b/api/v3/examples/SettingRevert.php @@ -4,7 +4,7 @@ Demonstrates reverting a parameter to default value */ function setting_revert_example(){ -$params = array( +$params = array( 'version' => 3, 'name' => 'address_format', ); @@ -19,18 +19,18 @@ $params = array( */ function setting_revert_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 5, 'id' => 1, - 'values' => array( + 'values' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'address_format' => '{contact.address_name} {contact.street_address} {contact.supplemental_address_1} diff --git a/api/v3/examples/Survey/ChainedGetDelete.php b/api/v3/examples/Survey/ChainedGetDelete.php index 1d14272881..28e453667f 100644 --- a/api/v3/examples/Survey/ChainedGetDelete.php +++ b/api/v3/examples/Survey/ChainedGetDelete.php @@ -23,10 +23,6 @@ function survey_get_expectedresult(){ $expectedResult = array( 'is_error' => 0, - 'undefined_fields' => array( - '0' => 'title', - '1' => 'api.survey.delete', - ), 'version' => 3, 'count' => 1, 'id' => 1, diff --git a/api/v3/examples/SurveyCreate.php b/api/v3/examples/SurveyCreate.php index 03f140f4e9..39f6d61138 100644 --- a/api/v3/examples/SurveyCreate.php +++ b/api/v3/examples/SurveyCreate.php @@ -25,14 +25,6 @@ function survey_create_expectedresult(){ $expectedResult = array( 'is_error' => 0, - 'undefined_fields' => array( - '0' => 'title', - '1' => 'activity_type_id', - '2' => 'max_number_of_contacts', - '3' => 'instructions', - '4' => 'created_id', - '5' => 'created_date', - ), 'version' => 3, 'count' => 1, 'id' => 1, diff --git a/api/v3/examples/SurveyGet.php b/api/v3/examples/SurveyGet.php index 0c3cfe919c..af565277af 100644 --- a/api/v3/examples/SurveyGet.php +++ b/api/v3/examples/SurveyGet.php @@ -25,12 +25,6 @@ function survey_get_expectedresult(){ $expectedResult = array( 'is_error' => 0, - 'undefined_fields' => array( - '0' => 'title', - '1' => 'activity_type_id', - '2' => 'max_number_of_contacts', - '3' => 'instructions', - ), 'version' => 3, 'count' => 1, 'id' => 1, -- 2.25.1