From: Seamus Lee Date: Tue, 20 Aug 2019 10:10:16 +0000 (+1000) Subject: [NFC] Update Examples X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8390b11ba7db0258ab7930526c4cb63929d8e0a3;p=civicrm-core.git [NFC] Update Examples --- diff --git a/Civi/Test/Api3DocTrait.php b/Civi/Test/Api3DocTrait.php index 6b3ad189a2..cde9462501 100644 --- a/Civi/Test/Api3DocTrait.php +++ b/Civi/Test/Api3DocTrait.php @@ -124,7 +124,9 @@ trait Api3DocTrait { mkdir($civicrm_root . "/api/v3/examples/$entity"); } $f = fopen($civicrm_root . "/api/v3/examples/$entity/$exampleName.php", "w+b"); - fwrite($f, $smarty->fetch($civicrm_root . '/tests/templates/documentFunction.tpl')); + $contents = $smarty->fetch($civicrm_root . '/tests/templates/documentFunction.tpl'); + $contents = \CRM_Core_CodeGen_Util_ArraySyntaxConverter::convert($contents); + fwrite($f, $contents); fclose($f); } } diff --git a/api/v3/examples/Activity/Get.php b/api/v3/examples/Activity/Get.php index 0c8055de06..014e703a3d 100644 --- a/api/v3/examples/Activity/Get.php +++ b/api/v3/examples/Activity/Get.php @@ -7,10 +7,9 @@ */ function activity_get_example() { $params = [ - 'contact_id' => 1, - 'activity_type_id' => 9999, - 'sequential' => 1, - 'return.custom_1' => 1, + 'case_id' => [ + 'IS NULL' => 1, + ], ]; try{ @@ -44,28 +43,25 @@ function activity_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 9, 'values' => [ - '0' => [ - 'id' => '1', - 'activity_type_id' => '9999', - 'subject' => 'test activity type id', - 'activity_date_time' => '2011-06-02 14:36:13', - 'duration' => '120', - 'location' => 'Pennsylvania', - 'details' => 'a test activity', + '9' => [ + 'id' => '9', + 'activity_type_id' => '2', + 'subject' => 'Ask not what your API can do for you, but what you can do for your API.', + 'activity_date_time' => '2019-08-20 19:10:43', 'status_id' => '2', - 'priority_id' => '1', + 'priority_id' => '2', 'is_test' => 0, 'is_auto' => 0, 'is_current_revision' => '1', 'is_deleted' => 0, 'is_star' => 0, - 'custom_1' => 'custom string', - 'source_contact_id' => '1', - 'status' => 'Completed', - 'activity_name' => 'Test activity type', - 'custom_1_1' => 'custom string', + 'created_date' => '2013-07-28 08:49:19', + 'modified_date' => '2012-11-14 16:02:35', + 'source_contact_id' => '19', + 'source_contact_name' => 'Mr. Anthony Anderson II', + 'source_contact_sort_name' => 'Anderson, Anthony', ], ], ]; @@ -75,22 +71,22 @@ function activity_get_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testActivityGetContact_idCustom" +* The test that created it is called "testGet" * and can be found at: -* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTest.php +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityCaseTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ActivityContact/Create.php b/api/v3/examples/ActivityContact/Create.php index 551318b114..d538c10419 100644 --- a/api/v3/examples/ActivityContact/Create.php +++ b/api/v3/examples/ActivityContact/Create.php @@ -64,17 +64,17 @@ function activity_contact_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ActivityContact/Delete.php b/api/v3/examples/ActivityContact/Delete.php index e3cc42dceb..34a0727e07 100644 --- a/api/v3/examples/ActivityContact/Delete.php +++ b/api/v3/examples/ActivityContact/Delete.php @@ -7,7 +7,7 @@ */ function activity_contact_delete_example() { $params = [ - 'id' => 8, + 'id' => 11, ]; try{ @@ -54,17 +54,17 @@ function activity_contact_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ActivityType/Create.php b/api/v3/examples/ActivityType/Create.php index 10325428f7..32298d8739 100644 --- a/api/v3/examples/ActivityType/Create.php +++ b/api/v3/examples/ActivityType/Create.php @@ -49,10 +49,10 @@ function activity_type_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 849, + 'id' => 869, 'values' => [ - '849' => [ - 'id' => '849', + '869' => [ + 'id' => '869', 'option_group_id' => '2', 'label' => 'send out letters', 'value' => '55', @@ -85,17 +85,17 @@ function activity_type_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ActivityType/Get.php b/api/v3/examples/ActivityType/Get.php index a1d8d70fd9..0c81f5052c 100644 --- a/api/v3/examples/ActivityType/Get.php +++ b/api/v3/examples/ActivityType/Get.php @@ -41,7 +41,7 @@ function activity_type_get_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 54, + 'count' => 35, 'values' => [ '1' => 'Meeting', '2' => 'Phone Call', @@ -55,27 +55,9 @@ function activity_type_get_expectedresult() { '10' => 'Pledge Acknowledgment', '11' => 'Pledge Reminder', '12' => 'Inbound Email', - '13' => 'Open Case', - '14' => 'Follow up', - '15' => 'Change Case Type', - '16' => 'Change Case Status', '17' => 'Membership Renewal Reminder', - '18' => 'Change Case Start Date', '19' => 'Bulk Email', - '20' => 'Assign Case Role', - '21' => 'Remove Case Role', '22' => 'Print/Merge Document', - '23' => 'Merge Case', - '24' => 'Reassigned Case', - '25' => 'Link Cases', - '26' => 'Change Case Tags', - '27' => 'Add Client To Case', - '28' => 'Survey', - '29' => 'Canvass', - '30' => 'PhoneBank', - '31' => 'WalkList', - '32' => 'Petition Signature', - '33' => 'Change Custom Data', '34' => 'Mass SMS', '35' => 'Change Membership Status', '36' => 'Change Membership Type', @@ -95,8 +77,7 @@ function activity_type_get_expectedresult() { '50' => 'Emailed Invoice', '51' => 'Contact Merged', '52' => 'Contact Deleted by Merge', - '53' => 'Failed Payment', - '54' => 'Close Accounting Period', + '54' => 'Failed Payment', ], 'deprecated' => 'The ActivityType api is deprecated. Please use the OptionValue api instead.', ]; @@ -111,17 +92,17 @@ function activity_type_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Address/AddressLike.php b/api/v3/examples/Address/AddressLike.php index b781816ce6..6f36acfeb3 100644 --- a/api/v3/examples/Address/AddressLike.php +++ b/api/v3/examples/Address/AddressLike.php @@ -50,8 +50,8 @@ function address_get_expectedresult() { 'values' => [ '0' => [ 'id' => '1', - 'contact_id' => '20', - 'location_type_id' => '18', + 'contact_id' => '4', + 'location_type_id' => '33', 'is_primary' => '1', 'is_billing' => 0, 'street_address' => 'Ambachtstraat 23', @@ -75,17 +75,17 @@ function address_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Address/AddressParse.php b/api/v3/examples/Address/AddressParse.php index ddd86d3cc0..264e7684bf 100644 --- a/api/v3/examples/Address/AddressParse.php +++ b/api/v3/examples/Address/AddressParse.php @@ -11,7 +11,7 @@ function address_create_example() { $params = [ 'street_parsing' => 1, 'street_address' => '54A Excelsior Ave. Apt 1C', - 'location_type_id' => 7, + 'location_type_id' => 8, 'contact_id' => 4, ]; @@ -51,7 +51,7 @@ function address_create_expectedresult() { '1' => [ 'id' => '1', 'contact_id' => '4', - 'location_type_id' => '7', + 'location_type_id' => '8', 'is_primary' => '1', 'is_billing' => 0, 'street_address' => '54A Excelsior Ave. Apt 1C', @@ -74,17 +74,17 @@ function address_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Address/AddressSort.php b/api/v3/examples/Address/AddressSort.php index edde7694d2..7c4937ba12 100644 --- a/api/v3/examples/Address/AddressSort.php +++ b/api/v3/examples/Address/AddressSort.php @@ -50,8 +50,8 @@ function address_get_expectedresult() { 'values' => [ '0' => [ 'id' => '2', - 'contact_id' => '19', - 'location_type_id' => '17', + 'contact_id' => '4', + 'location_type_id' => '31', 'is_primary' => '1', 'is_billing' => 0, 'street_address' => 'yzy', @@ -64,8 +64,8 @@ function address_get_expectedresult() { ], '1' => [ 'id' => '1', - 'contact_id' => '19', - 'location_type_id' => '17', + 'contact_id' => '4', + 'location_type_id' => '31', 'is_primary' => 0, 'is_billing' => 0, 'street_address' => 'Ambachtstraat 23', @@ -89,17 +89,17 @@ function address_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Address/Create.php b/api/v3/examples/Address/Create.php index d4075de134..870a0208e4 100644 --- a/api/v3/examples/Address/Create.php +++ b/api/v3/examples/Address/Create.php @@ -7,8 +7,7 @@ */ function address_create_example() { $params = [ - 'contact_id' => 3, - 'location_type_id' => 6, + 'contact_id' => 4, 'street_name' => 'Ambachtstraat', 'street_number' => '23', 'street_address' => 'Ambachtstraat 23', @@ -49,12 +48,12 @@ function address_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 1, 'values' => [ - '2' => [ - 'id' => '2', - 'contact_id' => '3', - 'location_type_id' => '6', + '1' => [ + 'id' => '1', + 'contact_id' => '4', + 'location_type_id' => '1', 'is_primary' => '1', 'is_billing' => 0, 'street_address' => 'Ambachtstraat 23', @@ -73,22 +72,22 @@ function address_create_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testCreateAddress" +* The test that created it is called "testCreateAddressDefaultLocation" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Address/Delete.php b/api/v3/examples/Address/Delete.php index 0f9508a113..ba8524486c 100644 --- a/api/v3/examples/Address/Delete.php +++ b/api/v3/examples/Address/Delete.php @@ -54,17 +54,17 @@ function address_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Address/Get.php b/api/v3/examples/Address/Get.php index 89cb571ae3..92f17e96cb 100644 --- a/api/v3/examples/Address/Get.php +++ b/api/v3/examples/Address/Get.php @@ -7,7 +7,7 @@ */ function address_get_example() { $params = [ - 'contact_id' => 17, + 'contact_id' => 4, 'street_name' => 'Ambachtstraat', ]; @@ -46,8 +46,8 @@ function address_get_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '17', - 'location_type_id' => '15', + 'contact_id' => '4', + 'location_type_id' => '27', 'is_primary' => '1', 'is_billing' => 0, 'street_address' => 'Ambachtstraat 23', @@ -71,17 +71,17 @@ function address_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Address/GetOptions.php b/api/v3/examples/Address/GetOptions.php index 3ec7f662b9..db58c9f81b 100644 --- a/api/v3/examples/Address/GetOptions.php +++ b/api/v3/examples/Address/GetOptions.php @@ -60,17 +60,17 @@ function address_getoptions_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ConstantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Batch/Create.php b/api/v3/examples/Batch/Create.php index e8cf61299b..978a965ab8 100644 --- a/api/v3/examples/Batch/Create.php +++ b/api/v3/examples/Batch/Create.php @@ -80,17 +80,17 @@ function batch_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/BatchTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Batch/Delete.php b/api/v3/examples/Batch/Delete.php index a8478434a5..0180f59c03 100644 --- a/api/v3/examples/Batch/Delete.php +++ b/api/v3/examples/Batch/Delete.php @@ -54,17 +54,17 @@ function batch_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/BatchTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Batch/Get.php b/api/v3/examples/Batch/Get.php index 45420adb86..84e73fed73 100644 --- a/api/v3/examples/Batch/Get.php +++ b/api/v3/examples/Batch/Get.php @@ -63,17 +63,17 @@ function batch_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/BatchTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Campaign/Create.php b/api/v3/examples/Campaign/Create.php index 1a8e74242d..342f8c3c64 100644 --- a/api/v3/examples/Campaign/Create.php +++ b/api/v3/examples/Campaign/Create.php @@ -59,7 +59,7 @@ function campaign_create_expectedresult() { 'status_id' => '', 'external_identifier' => '', 'parent_id' => '', - 'is_active' => '', + 'is_active' => '1', 'created_id' => '', 'created_date' => '2013-07-28 08:49:19', 'last_modified_id' => '', @@ -80,17 +80,17 @@ function campaign_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CampaignTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Campaign/Delete.php b/api/v3/examples/Campaign/Delete.php index b6d5d3c420..4acc3c37bb 100644 --- a/api/v3/examples/Campaign/Delete.php +++ b/api/v3/examples/Campaign/Delete.php @@ -54,17 +54,17 @@ function campaign_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CampaignTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Campaign/Get.php b/api/v3/examples/Campaign/Get.php index 5e6fb6a0f0..0938d0f7cb 100644 --- a/api/v3/examples/Campaign/Get.php +++ b/api/v3/examples/Campaign/Get.php @@ -66,17 +66,17 @@ function campaign_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CampaignTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Case/Create.php b/api/v3/examples/Case/Create.php index d57c589a9c..abea3d5eca 100644 --- a/api/v3/examples/Case/Create.php +++ b/api/v3/examples/Case/Create.php @@ -7,9 +7,10 @@ */ function case_create_example() { $params = [ + 'case_type_id' => 1, 'subject' => 'Test case', 'contact_id' => 17, - 'case_type' => 'housing_support', + 'custom_1' => 'custom string', ]; try{ @@ -53,7 +54,9 @@ function case_create_expectedresult() { 'end_date' => '', 'details' => '', 'status_id' => '1', - 'is_deleted' => '', + 'is_deleted' => 0, + 'created_date' => '2013-07-28 08:49:19', + 'modified_date' => '2012-11-14 16:02:35', ], ], ]; @@ -63,22 +66,22 @@ function case_create_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testCaseCreate" +* The test that created it is called "testCaseCreateCustom" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CaseTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/CaseContact/Create.php b/api/v3/examples/CaseContact/Create.php new file mode 100644 index 0000000000..9491e8d159 --- /dev/null +++ b/api/v3/examples/CaseContact/Create.php @@ -0,0 +1,78 @@ + 2, + 'contact_id' => 20, + ]; + + try{ + $result = civicrm_api3('CaseContact', 'create', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function case_contact_create_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 3, + 'values' => [ + '3' => [ + 'id' => '3', + 'case_id' => '2', + 'contact_id' => '20', + ], + ], + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testCaseContactCreate" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CaseContactTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/CaseContact/Get.php b/api/v3/examples/CaseContact/Get.php index 3f12514cea..75619449d6 100644 --- a/api/v3/examples/CaseContact/Get.php +++ b/api/v3/examples/CaseContact/Get.php @@ -61,17 +61,17 @@ function case_contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CaseContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Constant/Get.php b/api/v3/examples/Constant/Get.php index c147be4c92..24ee51a80f 100644 --- a/api/v3/examples/Constant/Get.php +++ b/api/v3/examples/Constant/Get.php @@ -43,7 +43,7 @@ function constant_get_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 36, + 'count' => 35, 'values' => [ '1' => 'Meeting', '2' => 'Phone Call', @@ -79,8 +79,7 @@ function constant_get_expectedresult() { '50' => 'Emailed Invoice', '51' => 'Contact Merged', '52' => 'Contact Deleted by Merge', - '53' => 'Failed Payment', - '54' => 'Close Accounting Period', + '54' => 'Failed Payment', ], 'deprecated' => 'The Constant api is deprecated as of CiviCRM 4.4. Please use the getoptions api action instead.', ]; @@ -95,17 +94,17 @@ function constant_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ConstantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/APIChainedArray.php b/api/v3/examples/Contact/APIChainedArray.php index d69e48ce4c..dbb7bc713a 100644 --- a/api/v3/examples/Contact/APIChainedArray.php +++ b/api/v3/examples/Contact/APIChainedArray.php @@ -78,7 +78,7 @@ function contact_get_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -115,7 +115,7 @@ function contact_get_expectedresult() { 'languages' => 'English (United States)', 'individual_prefix' => '', 'individual_suffix' => '', - 'communication_style' => '', + 'communication_style' => 'Formal', 'gender' => '', 'state_province_name' => '', 'state_province' => '', @@ -148,7 +148,9 @@ function contact_get_expectedresult() { 'display_name' => 'abc3 xyz3', 'contribution_id' => '2', 'currency' => 'USD', - 'payment_instrument' => 'Credit Card', + 'contribution_recur_id' => '', + 'contribution_status_id' => '1', + 'contribution_campaign_id' => '', 'payment_instrument_id' => '1', 'receive_date' => '2011-01-01 00:00:00', 'non_deductible_amount' => '10.00', @@ -157,37 +159,30 @@ function contact_get_expectedresult() { 'net_amount' => '90.00', 'trxn_id' => '12335', 'invoice_id' => '67830', - 'cancel_date' => '', + 'invoice_number' => '', + 'contribution_cancel_date' => '', 'cancel_reason' => '', 'receipt_date' => '', 'thankyou_date' => '', 'contribution_source' => 'SSF', 'amount_level' => '', - 'contribution_recur_id' => '', 'is_test' => 0, 'is_pay_later' => 0, - 'contribution_status' => 'Completed', - 'contribution_status_id' => '1', 'contribution_check_number' => '', - 'contribution_campaign_id' => '', - 'financial_type_id' => '1', - 'financial_type' => 'Donation', - 'product_id' => '', - 'product_name' => '', - 'sku' => '', - 'contribution_product_id' => '', - 'product_option' => '', - 'fulfilled_date' => '', - 'contribution_start_date' => '', - 'contribution_end_date' => '', 'financial_account_id' => '1', 'accounting_code' => '4200', 'campaign_id' => '', 'contribution_campaign_title' => '', + 'financial_type_id' => '1', + 'financial_type' => 'Donation', 'contribution_note' => '', 'contribution_batch' => '', + 'contribution_recur_status' => 'Completed', + 'payment_instrument' => 'Credit Card', + 'contribution_status' => 'Completed', 'check_number' => '', 'instrument_id' => '1', + 'cancel_date' => '', 'id' => '2', 'contribution_type_id' => '1', ], @@ -219,17 +214,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/APIChainedArrayFormats.php b/api/v3/examples/Contact/APIChainedArrayFormats.php index a0c462fcee..aed4d81f0a 100644 --- a/api/v3/examples/Contact/APIChainedArrayFormats.php +++ b/api/v3/examples/Contact/APIChainedArrayFormats.php @@ -79,7 +79,7 @@ function contact_get_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -116,7 +116,7 @@ function contact_get_expectedresult() { 'languages' => 'English (United States)', 'individual_prefix' => '', 'individual_suffix' => '', - 'communication_style' => '', + 'communication_style' => 'Formal', 'gender' => '', 'state_province_name' => '', 'state_province' => '', @@ -136,7 +136,7 @@ function contact_get_expectedresult() { 'count' => 0, 'values' => [], ], - 'api.Membership.getCount' => 0, + 'api.Membership.getCount' => 1, ], ], ]; @@ -151,17 +151,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php b/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php index 555b0d3bc1..75640d5586 100644 --- a/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php +++ b/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php @@ -76,7 +76,7 @@ function contact_get_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -113,7 +113,7 @@ function contact_get_expectedresult() { 'languages' => 'English (United States)', 'individual_prefix' => '', 'individual_suffix' => '', - 'communication_style' => '', + 'communication_style' => 'Formal', 'gender' => '', 'state_province_name' => '', 'state_province' => '', @@ -193,17 +193,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php b/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php index 91f2eae192..9570d244cd 100644 --- a/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php +++ b/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php @@ -83,7 +83,7 @@ function contact_create_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => '', @@ -126,17 +126,17 @@ function contact_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/ChainTwoWebsites.php b/api/v3/examples/Contact/ChainTwoWebsites.php index 1d2d015967..3526a4d009 100644 --- a/api/v3/examples/Contact/ChainTwoWebsites.php +++ b/api/v3/examples/Contact/ChainTwoWebsites.php @@ -25,6 +25,7 @@ function contact_create_example() { 'invoice_id' => 67990, 'source' => 'SSF', 'contribution_status_id' => 1, + 'skipCleanMoney' => 1, ], 'api.website.create' => [ 'url' => 'http://civicrm.org', @@ -95,7 +96,7 @@ function contact_create_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => '', @@ -136,6 +137,7 @@ function contact_create_expectedresult() { 'net_amount' => '90', 'trxn_id' => '15345', 'invoice_id' => '67990', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -199,17 +201,17 @@ function contact_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php index d3050a7b94..9d587c36b0 100644 --- a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php +++ b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php @@ -25,6 +25,7 @@ function contact_create_example() { 'invoice_id' => 67890, 'source' => 'SSF', 'contribution_status_id' => 1, + 'skipCleanMoney' => 1, ], 'api.website.create' => [ '0' => [ @@ -98,7 +99,7 @@ function contact_create_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => '', @@ -139,6 +140,7 @@ function contact_create_expectedresult() { 'net_amount' => '90', 'trxn_id' => '12345', 'invoice_id' => '67890', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -204,17 +206,17 @@ function contact_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/ContactIDOfLoggedInUserContactAPI.php b/api/v3/examples/Contact/ContactIDOfLoggedInUserContactAPI.php index c38bd4708b..a3f0d28d45 100644 --- a/api/v3/examples/Contact/ContactIDOfLoggedInUserContactAPI.php +++ b/api/v3/examples/Contact/ContactIDOfLoggedInUserContactAPI.php @@ -49,8 +49,8 @@ function contact_get_expectedresult() { 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', - 'sort_name' => 'User 412074113, Logged In', - 'display_name' => 'Mr. Logged In User 412074113 II', + 'sort_name' => 'User 202290815, Logged In', + 'display_name' => 'Mr. Logged In User 202290815 II', 'do_not_email' => 0, 'do_not_phone' => 0, 'do_not_mail' => 0, @@ -67,11 +67,11 @@ function contact_get_expectedresult() { 'preferred_mail_format' => 'Both', 'first_name' => 'Logged In', 'middle_name' => 'J.', - 'last_name' => 'User 412074113', + 'last_name' => 'User 202290815', 'prefix_id' => '3', 'suffix_id' => '3', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -86,6 +86,7 @@ function contact_get_expectedresult() { 'street_address' => '', 'supplemental_address_1' => '', 'supplemental_address_2' => '', + 'supplemental_address_3' => '', 'city' => '', 'postal_code_suffix' => '', 'postal_code' => '', @@ -107,7 +108,7 @@ function contact_get_expectedresult() { 'languages' => 'English (United States)', 'individual_prefix' => 'Mr.', 'individual_suffix' => 'II', - 'communication_style' => '', + 'communication_style' => 'Formal', 'gender' => '', 'state_province_name' => '', 'state_province' => '', @@ -127,17 +128,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/Create.php b/api/v3/examples/Contact/Create.php index a0727ef7e0..73ebfaa96f 100644 --- a/api/v3/examples/Contact/Create.php +++ b/api/v3/examples/Contact/Create.php @@ -76,7 +76,7 @@ function contact_create_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => '', @@ -112,17 +112,17 @@ function contact_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/CreateParticipantPayment.php b/api/v3/examples/Contact/CreateParticipantPayment.php index 9cc9537ae8..11aa8c872c 100644 --- a/api/v3/examples/Contact/CreateParticipantPayment.php +++ b/api/v3/examples/Contact/CreateParticipantPayment.php @@ -13,7 +13,7 @@ function contact_create_example() { 'contact_type' => 'Individual', 'display_name' => 'dlobo', 'api.participant' => [ - 'event_id' => 42, + 'event_id' => 43, 'status_id' => 1, 'role_id' => 1, 'format.only_id' => 1, @@ -90,7 +90,7 @@ function contact_create_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => '', @@ -141,17 +141,17 @@ function contact_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/CustomFieldGet.php b/api/v3/examples/Contact/CustomFieldGet.php index 32e6c2218a..d2dc04746f 100644 --- a/api/v3/examples/Contact/CustomFieldGet.php +++ b/api/v3/examples/Contact/CustomFieldGet.php @@ -65,17 +65,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php b/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php index 4e130c6fbf..0c4d4840db 100644 --- a/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php +++ b/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php @@ -65,17 +65,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/Delete.php b/api/v3/examples/Contact/Delete.php index c6d0df354b..ab8d6a6809 100644 --- a/api/v3/examples/Contact/Delete.php +++ b/api/v3/examples/Contact/Delete.php @@ -54,17 +54,17 @@ function contact_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/FormatIsSuccess_Fail.php b/api/v3/examples/Contact/FormatIsSuccess_Fail.php index c0625de776..4bff37e48d 100644 --- a/api/v3/examples/Contact/FormatIsSuccess_Fail.php +++ b/api/v3/examples/Contact/FormatIsSuccess_Fail.php @@ -53,17 +53,17 @@ function contact_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/FormatIsSuccess_True.php b/api/v3/examples/Contact/FormatIsSuccess_True.php index 14d29195ea..ca3a493b0f 100644 --- a/api/v3/examples/Contact/FormatIsSuccess_True.php +++ b/api/v3/examples/Contact/FormatIsSuccess_True.php @@ -10,7 +10,7 @@ */ function contact_get_example() { $params = [ - 'id' => 17, + 'id' => 3, 'format.is_success' => 1, ]; @@ -53,17 +53,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/FormatOnlyID.php b/api/v3/examples/Contact/FormatOnlyID.php index 201111a312..2aad1376a6 100644 --- a/api/v3/examples/Contact/FormatOnlyID.php +++ b/api/v3/examples/Contact/FormatOnlyID.php @@ -11,7 +11,7 @@ */ function contact_get_example() { $params = [ - 'id' => 17, + 'id' => 3, 'format.only_id' => 1, ]; @@ -42,7 +42,7 @@ function contact_get_example() { */ function contact_get_expectedresult() { - $expectedResult = 17; + $expectedResult = 3; return $expectedResult; } @@ -54,17 +54,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/FormatSingleValue.php b/api/v3/examples/Contact/FormatSingleValue.php index fa3f23783e..926da812be 100644 --- a/api/v3/examples/Contact/FormatSingleValue.php +++ b/api/v3/examples/Contact/FormatSingleValue.php @@ -11,7 +11,7 @@ */ function contact_getvalue_example() { $params = [ - 'id' => 17, + 'id' => 3, 'return' => 'display_name', ]; @@ -42,7 +42,7 @@ function contact_getvalue_example() { */ function contact_getvalue_expectedresult() { - $expectedResult = 'Test Contact'; + $expectedResult = 'Mr. Test Contact II'; return $expectedResult; } @@ -54,17 +54,17 @@ function contact_getvalue_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/Get.php b/api/v3/examples/Contact/Get.php index 17b6b62102..86b47f251b 100644 --- a/api/v3/examples/Contact/Get.php +++ b/api/v3/examples/Contact/Get.php @@ -69,7 +69,7 @@ function contact_get_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -106,7 +106,7 @@ function contact_get_expectedresult() { 'languages' => 'English (United States)', 'individual_prefix' => '', 'individual_suffix' => '', - 'communication_style' => '', + 'communication_style' => 'Formal', 'gender' => '', 'state_province_name' => '', 'state_province' => '', @@ -126,17 +126,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/GetActions.php b/api/v3/examples/Contact/GetActions.php index 459b2e1e64..5d293b478f 100644 --- a/api/v3/examples/Contact/GetActions.php +++ b/api/v3/examples/Contact/GetActions.php @@ -40,28 +40,37 @@ function contact_getactions_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 20, + 'count' => 29, 'values' => [ '0' => 'create', '1' => 'delete', '2' => 'duplicatecheck', - '3' => 'get', - '4' => 'getactions', - '5' => 'getcount', - '6' => 'getfield', - '7' => 'getfields', - '8' => 'getlist', - '9' => 'getoptions', - '10' => 'getquick', - '11' => 'getrefcount', - '12' => 'getsingle', - '13' => 'getvalue', - '14' => 'merge', - '15' => 'proximity', - '16' => 'replace', - '17' => 'setvalue', - '18' => 'update', - '19' => 'validate', + '3' => 'example_action1', + '4' => 'example_action2', + '5' => 'get', + '6' => 'get_merge_conflicts', + '7' => 'getactions', + '8' => 'getcount', + '9' => 'getfield', + '10' => 'getfields', + '11' => 'getlist', + '12' => 'getmergedfrom', + '13' => 'getmergedto', + '14' => 'getoptions', + '15' => 'getquick', + '16' => 'getrefcount', + '17' => 'getsingle', + '18' => 'getunique', + '19' => 'getvalue', + '20' => 'merge', + '21' => 'proximity', + '22' => 'replace', + '23' => 'setvalue', + '24' => 'type_create', + '25' => 'type_delete', + '26' => 'type_get', + '27' => 'update', + '28' => 'validate', ], 'deprecated' => [ 'getquick' => 'The "getquick" action is deprecated in favor of "getlist".', @@ -80,17 +89,17 @@ function contact_getactions_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/GetCountContact.php b/api/v3/examples/Contact/GetCountContact.php index 5bffef16fc..da0cff83cc 100644 --- a/api/v3/examples/Contact/GetCountContact.php +++ b/api/v3/examples/Contact/GetCountContact.php @@ -10,7 +10,7 @@ */ function contact_getcount_example() { $params = [ - 'id' => 17, + 'id' => 3, ]; try{ @@ -52,17 +52,17 @@ function contact_getcount_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/GetFieldsOptions.php b/api/v3/examples/Contact/GetFieldsOptions.php index d800b72680..392bbe1d38 100644 --- a/api/v3/examples/Contact/GetFieldsOptions.php +++ b/api/v3/examples/Contact/GetFieldsOptions.php @@ -45,7 +45,7 @@ function contact_getfields_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 55, + 'count' => 56, 'values' => [ 'id' => [ 'name' => 'id', @@ -60,6 +60,8 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, + 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'contact_id', ], @@ -71,11 +73,12 @@ function contact_getfields_expectedresult() { 'description' => 'Type of Contact.', 'maxlength' => 64, 'size' => 30, - 'export' => TRUE, 'where' => 'civicrm_contact.contact_type', + 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'maxlength' => 64, @@ -87,6 +90,7 @@ function contact_getfields_expectedresult() { 'labelColumn' => 'label', 'condition' => 'parent_id IS NULL', ], + 'is_core_field' => TRUE, 'api.required' => 1, ], 'contact_sub_type' => [ @@ -103,6 +107,8 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, + 'serialize' => 1, 'html' => [ 'type' => 'Select', 'maxlength' => 255, @@ -114,6 +120,7 @@ function contact_getfields_expectedresult() { 'labelColumn' => 'label', 'condition' => 'parent_id IS NOT NULL', ], + 'is_core_field' => TRUE, ], 'do_not_email' => [ 'name' => 'do_not_email', @@ -127,9 +134,11 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', ], + 'is_core_field' => TRUE, ], 'do_not_phone' => [ 'name' => 'do_not_phone', @@ -143,9 +152,11 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', ], + 'is_core_field' => TRUE, ], 'do_not_mail' => [ 'name' => 'do_not_mail', @@ -159,9 +170,11 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', ], + 'is_core_field' => TRUE, ], 'do_not_sms' => [ 'name' => 'do_not_sms', @@ -175,9 +188,11 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', ], + 'is_core_field' => TRUE, ], 'do_not_trade' => [ 'name' => 'do_not_trade', @@ -191,9 +206,11 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', ], + 'is_core_field' => TRUE, ], 'is_opt_out' => [ 'name' => 'is_opt_out', @@ -207,16 +224,17 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', ], + 'is_core_field' => TRUE, ], 'legal_identifier' => [ 'name' => 'legal_identifier', 'type' => 2, 'title' => 'Legal Identifier', - 'description' => 'May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID. - ', + 'description' => 'May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.', 'maxlength' => 32, 'size' => 20, 'import' => TRUE, @@ -227,11 +245,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 32, 'size' => 20, ], + 'is_core_field' => TRUE, ], 'external_identifier' => [ 'name' => 'external_identifier', @@ -248,11 +268,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 64, 'size' => 8, ], + 'is_core_field' => TRUE, ], 'sort_name' => [ 'name' => 'sort_name', @@ -261,16 +283,18 @@ function contact_getfields_expectedresult() { 'description' => 'Name used for sorting different contact types', 'maxlength' => 128, 'size' => 30, - 'export' => TRUE, 'where' => 'civicrm_contact.sort_name', + 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 128, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'display_name' => [ 'name' => 'display_name', @@ -279,16 +303,18 @@ function contact_getfields_expectedresult() { 'description' => 'Formatted name representing preferred format for display/print/other output.', 'maxlength' => 128, 'size' => 30, - 'export' => TRUE, 'where' => 'civicrm_contact.display_name', + 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 128, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'nick_name' => [ 'name' => 'nick_name', @@ -305,11 +331,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 128, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'legal_name' => [ 'name' => 'legal_name', @@ -325,11 +353,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 128, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'image_URL' => [ 'name' => 'image_URL', @@ -342,11 +372,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'File', 'rows' => 2, 'cols' => 80, ], + 'is_core_field' => TRUE, ], 'preferred_communication_method' => [ 'name' => 'preferred_communication_method', @@ -363,6 +395,8 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, + 'serialize' => 1, 'html' => [ 'type' => 'Select', 'maxlength' => 255, @@ -372,6 +406,7 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'preferred_communication_method', 'optionEditPath' => 'civicrm/admin/options/preferred_communication_method', ], + 'is_core_field' => TRUE, ], 'preferred_language' => [ 'name' => 'preferred_language', @@ -387,6 +422,7 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'maxlength' => 5, @@ -397,6 +433,7 @@ function contact_getfields_expectedresult() { 'keyColumn' => 'name', 'optionEditPath' => 'civicrm/admin/options/languages', ], + 'is_core_field' => TRUE, ], 'preferred_mail_format' => [ 'name' => 'preferred_mail_format', @@ -413,6 +450,7 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'maxlength' => 8, @@ -421,6 +459,7 @@ function contact_getfields_expectedresult() { 'pseudoconstant' => [ 'callback' => 'CRM_Core_SelectValues::pmf', ], + 'is_core_field' => TRUE, ], 'hash' => [ 'name' => 'hash', @@ -429,11 +468,13 @@ function contact_getfields_expectedresult() { 'description' => 'Key for validating requests related to this contact.', 'maxlength' => 32, 'size' => 20, - 'export' => TRUE, 'where' => 'civicrm_contact.hash', + 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'api_key' => [ 'name' => 'api_key', @@ -442,9 +483,18 @@ function contact_getfields_expectedresult() { 'description' => 'API Key for validating requests related to this contact.', 'maxlength' => 32, 'size' => 20, + 'where' => 'civicrm_contact.api_key', + 'permission' => [ + '0' => [ + '0' => 'administer CiviCRM', + '1' => 'edit api keys', + ], + ], 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'first_name' => [ 'name' => 'first_name', @@ -461,11 +511,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 64, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'middle_name' => [ 'name' => 'middle_name', @@ -482,11 +534,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 64, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'last_name' => [ 'name' => 'last_name', @@ -503,11 +557,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 64, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'prefix_id' => [ 'name' => 'prefix_id', @@ -522,6 +578,7 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'size' => 6, @@ -531,6 +588,7 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'individual_prefix', 'optionEditPath' => 'civicrm/admin/options/individual_prefix', ], + 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'individual_prefix', '1' => 'individual_prefix_id', @@ -549,6 +607,7 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'size' => 6, @@ -558,6 +617,7 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'individual_suffix', 'optionEditPath' => 'civicrm/admin/options/individual_suffix', ], + 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'individual_suffix', '1' => 'individual_suffix_id', @@ -577,22 +637,25 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 64, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'communication_style_id' => [ 'name' => 'communication_style_id', 'type' => 1, 'title' => 'Communication Style', 'description' => 'Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.', - 'export' => TRUE, 'where' => 'civicrm_contact.communication_style_id', + 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'size' => 6, @@ -602,15 +665,24 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'communication_style', 'optionEditPath' => 'civicrm/admin/options/communication_style', ], + 'is_core_field' => TRUE, ], 'email_greeting_id' => [ 'name' => 'email_greeting_id', 'type' => 1, 'title' => 'Email Greeting ID', 'description' => 'FK to civicrm_option_value.id, that has to be valid registered Email Greeting.', + 'where' => 'civicrm_contact.email_greeting_id', + 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, + 'pseudoconstant' => [ + 'optionGroupName' => 'email_greeting', + 'optionEditPath' => 'civicrm/admin/options/email_greeting', + ], + 'is_core_field' => TRUE, ], 'email_greeting_custom' => [ 'name' => 'email_greeting_custom', @@ -624,11 +696,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 128, 'size' => 45, ], + 'is_core_field' => TRUE, ], 'email_greeting_display' => [ 'name' => 'email_greeting_display', @@ -637,28 +711,39 @@ function contact_getfields_expectedresult() { 'description' => 'Cache Email Greeting.', 'maxlength' => 255, 'size' => 45, + 'where' => 'civicrm_contact.email_greeting_display', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 255, 'size' => 45, ], + 'is_core_field' => TRUE, ], 'postal_greeting_id' => [ 'name' => 'postal_greeting_id', 'type' => 1, 'title' => 'Postal Greeting ID', 'description' => 'FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.', + 'where' => 'civicrm_contact.postal_greeting_id', + 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'size' => 6, 'maxlength' => 14, ], + 'pseudoconstant' => [ + 'optionGroupName' => 'postal_greeting', + 'optionEditPath' => 'civicrm/admin/options/postal_greeting', + ], + 'is_core_field' => TRUE, ], 'postal_greeting_custom' => [ 'name' => 'postal_greeting_custom', @@ -672,11 +757,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 128, 'size' => 45, ], + 'is_core_field' => TRUE, ], 'postal_greeting_display' => [ 'name' => 'postal_greeting_display', @@ -685,23 +772,34 @@ function contact_getfields_expectedresult() { 'description' => 'Cache Postal greeting.', 'maxlength' => 255, 'size' => 45, + 'where' => 'civicrm_contact.postal_greeting_display', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 255, 'size' => 45, ], + 'is_core_field' => TRUE, ], 'addressee_id' => [ 'name' => 'addressee_id', 'type' => 1, 'title' => 'Addressee ID', 'description' => 'FK to civicrm_option_value.id, that has to be valid registered Addressee.', + 'where' => 'civicrm_contact.addressee_id', + 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, + 'pseudoconstant' => [ + 'optionGroupName' => 'addressee', + 'optionEditPath' => 'civicrm/admin/options/addressee', + ], + 'is_core_field' => TRUE, ], 'addressee_custom' => [ 'name' => 'addressee_custom', @@ -715,11 +813,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 128, 'size' => 45, ], + 'is_core_field' => TRUE, ], 'addressee_display' => [ 'name' => 'addressee_display', @@ -728,14 +828,17 @@ function contact_getfields_expectedresult() { 'description' => 'Cache Addressee.', 'maxlength' => 255, 'size' => 45, + 'where' => 'civicrm_contact.addressee_display', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 255, 'size' => 45, ], + 'is_core_field' => TRUE, ], 'job_title' => [ 'name' => 'job_title', @@ -752,11 +855,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 255, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'gender_id' => [ 'name' => 'gender_id', @@ -770,6 +875,7 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'size' => 6, @@ -779,6 +885,7 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'gender', 'optionEditPath' => 'civicrm/admin/options/gender', ], + 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'gender', ], @@ -796,10 +903,12 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Select Date', - 'format' => 'birth', + 'formatType' => 'birth', ], + 'is_core_field' => TRUE, ], 'is_deceased' => [ 'name' => 'is_deceased', @@ -812,9 +921,11 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', ], + 'is_core_field' => TRUE, ], 'deceased_date' => [ 'name' => 'deceased_date', @@ -828,10 +939,12 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Select Date', - 'format' => 'birth', + 'formatType' => 'birth', ], + 'is_core_field' => TRUE, ], 'household_name' => [ 'name' => 'household_name', @@ -848,26 +961,31 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 128, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'primary_contact_id' => [ 'name' => 'primary_contact_id', 'type' => 1, 'title' => 'Household Primary Contact ID', 'description' => 'Optional FK to Primary Contact for this household.', + 'where' => 'civicrm_contact.primary_contact_id', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', 'html' => [ 'type' => 'Select', 'size' => 6, 'maxlength' => 14, ], + 'is_core_field' => TRUE, 'FKApiName' => 'Contact', ], 'organization_name' => [ @@ -885,11 +1003,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 128, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'sic_code' => [ 'name' => 'sic_code', @@ -905,11 +1025,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 8, 'size' => 8, ], + 'is_core_field' => TRUE, ], 'user_unique_id' => [ 'name' => 'user_unique_id', @@ -927,11 +1049,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 255, 'size' => 45, ], + 'is_core_field' => TRUE, ], 'created_date' => [ 'name' => 'created_date', @@ -939,12 +1063,14 @@ function contact_getfields_expectedresult() { 'title' => 'Created Date', 'description' => 'When was the contact was created.', 'required' => '', - 'export' => TRUE, 'where' => 'civicrm_contact.created_date', + 'export' => TRUE, 'default' => 'NULL', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'modified_date' => [ 'name' => 'modified_date', @@ -952,12 +1078,14 @@ function contact_getfields_expectedresult() { 'title' => 'Modified Date', 'description' => 'When was the contact (or closely related entity) was created or modified or deleted.', 'required' => '', - 'export' => TRUE, 'where' => 'civicrm_contact.modified_date', + 'export' => TRUE, 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'source' => [ 'name' => 'source', @@ -973,11 +1101,13 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 255, 'size' => 30, ], + 'is_core_field' => TRUE, 'uniqueName' => 'contact_source', ], 'employer_id' => [ @@ -985,17 +1115,19 @@ function contact_getfields_expectedresult() { 'type' => 1, 'title' => 'Current Employer', 'description' => 'OPTIONAL FK to civicrm_contact record.', - 'export' => TRUE, 'where' => 'civicrm_contact.employer_id', + 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', 'html' => [ 'type' => 'EntityRef', 'size' => 6, 'maxlength' => 14, ], + 'is_core_field' => TRUE, 'uniqueName' => 'current_employer_id', 'FKApiName' => 'Contact', ], @@ -1004,20 +1136,28 @@ function contact_getfields_expectedresult() { 'type' => 16, 'title' => 'Contact is in Trash', 'required' => TRUE, - 'export' => TRUE, 'where' => 'civicrm_contact.is_deleted', + 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', ], + 'is_core_field' => TRUE, 'uniqueName' => 'contact_is_deleted', ], 'custom_1' => [ + 'id' => '1', 'label' => 'Our special field', - 'groupTitle' => 'select_test_g', + 'headerPattern' => '//', + 'title' => 'Our special field', + 'custom_field_id' => '1', + 'groupTitle' => 'select_test_group', 'data_type' => 'String', + 'name' => 'custom_1', + 'type' => 2, 'html_type' => 'Select', 'default_value' => '', 'text_length' => '', @@ -1029,19 +1169,19 @@ function contact_getfields_expectedresult() { 'extends_entity_column_id' => '', 'is_view' => 0, 'is_multiple' => 0, - 'option_group_id' => '105', + 'option_group_id' => '110', 'date_format' => '', 'time_format' => '', 'is_required' => '1', 'table_name' => 'civicrm_value_select_test_g_1', 'column_name' => 'our_special_field_1', + 'where' => 'civicrm_value_select_test_g_1.our_special_field_1', + 'extends_table' => 'civicrm_contact', + 'search_table' => 'contact_a', 'pseudoconstant' => [ - 'optionGroupName' => 'our_special_field_20170207021937', - 'optionEditPath' => 'civicrm/admin/options/our_special_field_20170207021937', + 'optionGroupName' => 'our_special_field_20190820191605', + 'optionEditPath' => 'civicrm/admin/options/our_special_field_20190820191605', ], - 'name' => 'custom_1', - 'title' => 'Our special field', - 'type' => 2, 'options' => [ '1' => 'Label1', '2' => 'Label2', @@ -1059,6 +1199,13 @@ function contact_getfields_expectedresult() { 'type' => 16, 'name' => 'dupe_check', ], + 'skip_greeting_processing' => [ + 'title' => 'Skip Greeting processing', + 'description' => 'Do not process greetings, (these can be done by scheduled job and there may be a preference to do so for performance reasons)', + 'type' => 16, + 'api.default' => 0, + 'name' => 'skip_greeting_processing', + ], ], ]; @@ -1072,17 +1219,17 @@ function contact_getfields_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/GetMergedfrom.php b/api/v3/examples/Contact/GetMergedfrom.php new file mode 100644 index 0000000000..5349486299 --- /dev/null +++ b/api/v3/examples/Contact/GetMergedfrom.php @@ -0,0 +1,80 @@ + 4, + ]; + + try{ + $result = civicrm_api3('Contact', 'getmergedfrom', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function contact_getmergedfrom_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 3, + 'values' => [ + '3' => [ + 'id' => '3', + ], + '5' => [ + 'id' => '5', + ], + '6' => [ + 'id' => '6', + ], + ], + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testMergedGet" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/Contact/GetMergedto.php b/api/v3/examples/Contact/GetMergedto.php new file mode 100644 index 0000000000..7d50e49cc8 --- /dev/null +++ b/api/v3/examples/Contact/GetMergedto.php @@ -0,0 +1,76 @@ + 1, + 'contact_id' => 6, + ]; + + try{ + $result = civicrm_api3('Contact', 'getmergedto', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function contact_getmergedto_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 4, + 'values' => [ + '0' => [ + 'id' => '4', + ], + ], + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testMergedGet" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/Contact/GetOptions.php b/api/v3/examples/Contact/GetOptions.php index 352a2296ea..60cd8e5197 100644 --- a/api/v3/examples/Contact/GetOptions.php +++ b/api/v3/examples/Contact/GetOptions.php @@ -59,17 +59,17 @@ function contact_getoptions_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/GetSingleContact.php b/api/v3/examples/Contact/GetSingleContact.php index de75c962f4..1c5534833b 100644 --- a/api/v3/examples/Contact/GetSingleContact.php +++ b/api/v3/examples/Contact/GetSingleContact.php @@ -11,7 +11,7 @@ */ function contact_getsingle_example() { $params = [ - 'id' => 17, + 'id' => 3, ]; try{ @@ -42,16 +42,16 @@ function contact_getsingle_example() { function contact_getsingle_expectedresult() { $expectedResult = [ - 'contact_id' => '17', + 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', - 'sort_name' => '', - 'display_name' => 'Test Contact', - 'do_not_email' => '', - 'do_not_phone' => '', - 'do_not_mail' => '', - 'do_not_sms' => '', - 'do_not_trade' => '', + 'sort_name' => 'Contact, Test', + 'display_name' => 'Mr. Test Contact II', + 'do_not_email' => 0, + 'do_not_phone' => 0, + 'do_not_mail' => 0, + 'do_not_sms' => 0, + 'do_not_trade' => 0, 'is_opt_out' => 0, 'legal_identifier' => '', 'external_identifier' => '', @@ -59,15 +59,15 @@ function contact_getsingle_expectedresult() { 'legal_name' => '', 'image_URL' => '', 'preferred_communication_method' => '', - 'preferred_language' => '', - 'preferred_mail_format' => '', + 'preferred_language' => 'en_US', + 'preferred_mail_format' => 'Both', 'first_name' => 'Test', - 'middle_name' => '', + 'middle_name' => 'J.', 'last_name' => 'Contact', - 'prefix_id' => '', - 'suffix_id' => '', + 'prefix_id' => '3', + 'suffix_id' => '3', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -93,23 +93,23 @@ function contact_getsingle_expectedresult() { 'phone_id' => '', 'phone_type_id' => '', 'phone' => '', - 'email_id' => '', - 'email' => '', - 'on_hold' => '', + 'email_id' => '1', + 'email' => 'anthony_anderson@civicrm.org', + 'on_hold' => 0, 'im_id' => '', 'provider_id' => '', 'im' => '', 'worldregion_id' => '', 'world_region' => '', - 'languages' => '', - 'individual_prefix' => '', - 'individual_suffix' => '', - 'communication_style' => '', + 'languages' => 'English (United States)', + 'individual_prefix' => 'Mr.', + 'individual_suffix' => 'II', + 'communication_style' => 'Formal', 'gender' => '', 'state_province_name' => '', 'state_province' => '', 'country' => '', - 'id' => '17', + 'id' => '3', ]; return $expectedResult; @@ -122,17 +122,17 @@ function contact_getsingle_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/GetUnique.php b/api/v3/examples/Contact/GetUnique.php new file mode 100644 index 0000000000..b8f75bcc4e --- /dev/null +++ b/api/v3/examples/Contact/GetUnique.php @@ -0,0 +1,71 @@ +getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function contact_getunique_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 'UI_external_identifier', + 'values' => [ + 'UI_external_identifier' => [], + ], + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testContactGetUnique" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/Contact/GroupFilterUsingContactAPI.php b/api/v3/examples/Contact/GroupFilterUsingContactAPI.php index 43d22f067b..1fd3b4f3ac 100644 --- a/api/v3/examples/Contact/GroupFilterUsingContactAPI.php +++ b/api/v3/examples/Contact/GroupFilterUsingContactAPI.php @@ -76,7 +76,7 @@ function contact_get_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -113,7 +113,7 @@ function contact_get_expectedresult() { 'languages' => 'English (United States)', 'individual_prefix' => '', 'individual_suffix' => '', - 'communication_style' => '', + 'communication_style' => 'Formal', 'gender' => '', 'state_province_name' => '', 'state_province' => '', @@ -133,17 +133,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contact/NestedReplaceEmail.php b/api/v3/examples/Contact/NestedReplaceEmail.php index 753e3ffa78..04d61e2bc6 100644 --- a/api/v3/examples/Contact/NestedReplaceEmail.php +++ b/api/v3/examples/Contact/NestedReplaceEmail.php @@ -9,31 +9,31 @@ */ function contact_get_example() { $params = [ - 'id' => 10, + 'id' => 19, 'api.email.replace' => [ 'values' => [ '0' => [ - 'location_type_id' => 20, + 'location_type_id' => 38, 'email' => '1-1@example.com', 'is_primary' => 1, ], '1' => [ - 'location_type_id' => 20, + 'location_type_id' => 38, 'email' => '1-2@example.com', 'is_primary' => 0, ], '2' => [ - 'location_type_id' => 20, + 'location_type_id' => 38, 'email' => '1-3@example.com', 'is_primary' => 0, ], '3' => [ - 'location_type_id' => 21, + 'location_type_id' => 39, 'email' => '2-1@example.com', 'is_primary' => 0, ], '4' => [ - 'location_type_id' => 21, + 'location_type_id' => 39, 'email' => '2-2@example.com', 'is_primary' => 0, ], @@ -72,10 +72,10 @@ function contact_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 10, + 'id' => 19, 'values' => [ - '10' => [ - 'contact_id' => '10', + '19' => [ + 'contact_id' => '19', 'contact_type' => 'Organization', 'contact_sub_type' => '', 'sort_name' => 'Unit Test Organization', @@ -100,7 +100,7 @@ function contact_get_expectedresult() { 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -134,27 +134,28 @@ function contact_get_expectedresult() { 'im' => '', 'worldregion_id' => '', 'world_region' => '', + 'languages' => 'English (United States)', 'individual_prefix' => '', 'individual_suffix' => '', - 'communication_style' => '', + 'communication_style' => 'Formal', 'gender' => '', 'state_province_name' => '', 'state_province' => '', 'country' => '', - 'id' => '10', + 'id' => '19', 'api.email.replace' => [ 'is_error' => 0, 'version' => 3, 'count' => 5, 'values' => [ '0' => [ - 'id' => '18', - 'contact_id' => '10', - 'location_type_id' => '20', + 'id' => '19', + 'contact_id' => '19', + 'location_type_id' => '38', 'email' => '1-1@example.com', 'is_primary' => '1', 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', @@ -162,13 +163,13 @@ function contact_get_expectedresult() { 'signature_html' => '', ], '1' => [ - 'id' => '19', - 'contact_id' => '10', - 'location_type_id' => '20', + 'id' => '20', + 'contact_id' => '19', + 'location_type_id' => '38', 'email' => '1-2@example.com', 'is_primary' => 0, 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', @@ -176,13 +177,13 @@ function contact_get_expectedresult() { 'signature_html' => '', ], '2' => [ - 'id' => '20', - 'contact_id' => '10', - 'location_type_id' => '20', + 'id' => '21', + 'contact_id' => '19', + 'location_type_id' => '38', 'email' => '1-3@example.com', 'is_primary' => 0, 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', @@ -190,13 +191,13 @@ function contact_get_expectedresult() { 'signature_html' => '', ], '3' => [ - 'id' => '21', - 'contact_id' => '10', - 'location_type_id' => '21', + 'id' => '22', + 'contact_id' => '19', + 'location_type_id' => '39', 'email' => '2-1@example.com', 'is_primary' => 0, 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', @@ -204,13 +205,13 @@ function contact_get_expectedresult() { 'signature_html' => '', ], '4' => [ - 'id' => '22', - 'contact_id' => '10', - 'location_type_id' => '21', + 'id' => '23', + 'contact_id' => '19', + 'location_type_id' => '39', 'email' => '2-2@example.com', 'is_primary' => 0, 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', @@ -233,17 +234,17 @@ function contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EmailTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.php b/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.php index fc33466272..e775abbb76 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.php +++ b/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.php @@ -9,7 +9,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 28, + 'contact_id' => 31, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -18,7 +18,7 @@ function contribution_create_example() { 'net_amount' => '95', 'source' => 'SSF', 'contribution_status_id' => 1, - 'honor_contact_id' => 29, + 'honor_contact_id' => 32, ]; try{ @@ -56,7 +56,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '28', + 'contact_id' => '31', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -67,6 +67,7 @@ function contribution_create_expectedresult() { 'net_amount' => '95', 'trxn_id' => '', 'invoice_id' => '', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -99,17 +100,17 @@ function contribution_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contribution/ContributionCreateWithNote.php b/api/v3/examples/Contribution/ContributionCreateWithNote.php index d9e863ea23..1c22dd7f1f 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithNote.php +++ b/api/v3/examples/Contribution/ContributionCreateWithNote.php @@ -9,7 +9,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 22, + 'contact_id' => 25, 'receive_date' => '2012-01-01', 'total_amount' => '100', 'financial_type_id' => 1, @@ -59,7 +59,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '22', + 'contact_id' => '25', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '1', @@ -70,6 +70,7 @@ function contribution_create_expectedresult() { 'net_amount' => '90', 'trxn_id' => '12345', 'invoice_id' => '67890', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -102,17 +103,17 @@ function contribution_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php b/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php index e8f3cf62b4..e4d36539ba 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php +++ b/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php @@ -9,7 +9,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 24, + 'contact_id' => 27, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -20,7 +20,7 @@ function contribution_create_example() { 'contribution_status_id' => 1, 'soft_credit' => [ '1' => [ - 'contact_id' => 25, + 'contact_id' => 28, 'amount' => 50, 'soft_credit_type_id' => 3, ], @@ -62,7 +62,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '24', + 'contact_id' => '27', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -73,6 +73,7 @@ function contribution_create_expectedresult() { 'net_amount' => '95', 'trxn_id' => '', 'invoice_id' => '', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -105,17 +106,17 @@ function contribution_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php b/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php index 9698b850e5..2c6729fb0a 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php +++ b/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php @@ -9,7 +9,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 26, + 'contact_id' => 29, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -18,7 +18,7 @@ function contribution_create_example() { 'net_amount' => '95', 'source' => 'SSF', 'contribution_status_id' => 1, - 'soft_credit_to' => 27, + 'soft_credit_to' => 30, ]; try{ @@ -56,7 +56,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '26', + 'contact_id' => '29', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -67,6 +67,7 @@ function contribution_create_expectedresult() { 'net_amount' => '95', 'trxn_id' => '', 'invoice_id' => '', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -99,17 +100,17 @@ function contribution_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contribution/Create.php b/api/v3/examples/Contribution/Create.php index df458f5908..7540683df7 100644 --- a/api/v3/examples/Contribution/Create.php +++ b/api/v3/examples/Contribution/Create.php @@ -65,6 +65,7 @@ function contribution_create_expectedresult() { 'net_amount' => '100', 'trxn_id' => '12345', 'invoice_id' => '67890', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -83,7 +84,6 @@ function contribution_create_expectedresult() { 'tax_amount' => '', 'revenue_recognition_date' => '', 'contribution_type_id' => '1', - 'invoice_number' => '', ], ], ]; @@ -98,17 +98,17 @@ function contribution_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contribution/CreateWithNestedLineItems.php b/api/v3/examples/Contribution/CreateWithNestedLineItems.php index dd23dd07a6..3c27c405c5 100644 --- a/api/v3/examples/Contribution/CreateWithNestedLineItems.php +++ b/api/v3/examples/Contribution/CreateWithNestedLineItems.php @@ -9,7 +9,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 11, + 'contact_id' => 12, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -73,7 +73,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '11', + 'contact_id' => '12', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '1', @@ -84,6 +84,7 @@ function contribution_create_expectedresult() { 'net_amount' => '90', 'trxn_id' => '12345', 'invoice_id' => '67890', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -166,17 +167,17 @@ function contribution_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contribution/Delete.php b/api/v3/examples/Contribution/Delete.php index bb445f01b5..b13f4108dd 100644 --- a/api/v3/examples/Contribution/Delete.php +++ b/api/v3/examples/Contribution/Delete.php @@ -57,17 +57,17 @@ function contribution_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contribution/Get.php b/api/v3/examples/Contribution/Get.php index ee07a1ab53..410875dc47 100644 --- a/api/v3/examples/Contribution/Get.php +++ b/api/v3/examples/Contribution/Get.php @@ -51,6 +51,10 @@ function contribution_get_expectedresult() { 'display_name' => 'Mr. Anthony Anderson II', 'contribution_id' => '1', 'currency' => 'USD', + 'contribution_recur_id' => '', + 'contribution_status_id' => '1', + 'contribution_campaign_id' => '', + 'payment_instrument_id' => '4', 'receive_date' => '2010-01-20 00:00:00', 'non_deductible_amount' => '10.00', 'total_amount' => '100.00', @@ -58,39 +62,30 @@ function contribution_get_expectedresult() { 'net_amount' => '95.00', 'trxn_id' => '23456', 'invoice_id' => '78910', - 'cancel_date' => '', + 'invoice_number' => 'INV_1', + 'contribution_cancel_date' => '', 'cancel_reason' => '', 'receipt_date' => '', 'thankyou_date' => '', 'contribution_source' => 'SSF', 'amount_level' => '', - 'contribution_recur_id' => '', 'is_test' => 0, 'is_pay_later' => 0, - 'contribution_status_id' => '1', 'contribution_check_number' => '', - 'contribution_campaign_id' => '', - 'financial_type_id' => '1', - 'financial_type' => 'Donation', - 'product_id' => '', - 'product_name' => '', - 'sku' => '', - 'contribution_product_id' => '', - 'product_option' => '', - 'fulfilled_date' => '', - 'contribution_start_date' => '', - 'contribution_end_date' => '', 'financial_account_id' => '1', 'accounting_code' => '4200', 'campaign_id' => '', 'contribution_campaign_title' => '', + 'financial_type_id' => '1', + 'financial_type' => 'Donation', 'contribution_note' => '', 'contribution_batch' => '', - 'contribution_status' => 'Completed', + 'contribution_recur_status' => 'Completed', 'payment_instrument' => 'Check', - 'payment_instrument_id' => '4', - 'instrument_id' => '4', + 'contribution_status' => 'Completed', 'check_number' => '', + 'instrument_id' => '4', + 'cancel_date' => '', 'id' => '1', 'contribution_type_id' => '1', ], @@ -107,17 +102,17 @@ function contribution_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Contribution/GetUnique.php b/api/v3/examples/Contribution/GetUnique.php new file mode 100644 index 0000000000..04b96bece6 --- /dev/null +++ b/api/v3/examples/Contribution/GetUnique.php @@ -0,0 +1,71 @@ +getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function contribution_getunique_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 2, + 'values' => [ + 'UI_contrib_trxn_id' => [], + 'UI_contrib_invoice_id' => [], + ], + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testContributionGetUnique" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/ContributionPage/Create.php b/api/v3/examples/ContributionPage/Create.php index 2b18e3ffca..5ad0fd2858 100644 --- a/api/v3/examples/ContributionPage/Create.php +++ b/api/v3/examples/ContributionPage/Create.php @@ -97,6 +97,7 @@ function contribution_page_create_expectedresult() { 'campaign_id' => '', 'is_share' => '', 'is_billing_required' => '', + 'contribution_type_id' => '1', ], ], ]; @@ -111,17 +112,17 @@ function contribution_page_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ContributionPage/Delete.php b/api/v3/examples/ContributionPage/Delete.php index 87221bb754..423f5c2b08 100644 --- a/api/v3/examples/ContributionPage/Delete.php +++ b/api/v3/examples/ContributionPage/Delete.php @@ -54,17 +54,17 @@ function contribution_page_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ContributionPage/Get.php b/api/v3/examples/ContributionPage/Get.php index f5b2b365ba..ae66d5d0db 100644 --- a/api/v3/examples/ContributionPage/Get.php +++ b/api/v3/examples/ContributionPage/Get.php @@ -82,17 +82,17 @@ function contribution_page_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ContributionPage/Submit.php b/api/v3/examples/ContributionPage/Submit.php index e58d1ef989..c7ef21f1c0 100644 --- a/api/v3/examples/ContributionPage/Submit.php +++ b/api/v3/examples/ContributionPage/Submit.php @@ -26,11 +26,11 @@ function contribution_page_submit_example() { ], 'cvv2' => 123, 'pledge_id' => '1', - 'cid' => '83', - 'contact_id' => '83', + 'cid' => '4', + 'contact_id' => '4', 'amount' => '100', 'is_pledge' => TRUE, - 'pledge_block_id' => 2, + 'pledge_block_id' => 1, ]; try{ @@ -77,17 +77,17 @@ function contribution_page_submit_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ContributionRecur/Create.php b/api/v3/examples/ContributionRecur/Create.php index dc953c9d4f..7018d2ef9f 100644 --- a/api/v3/examples/ContributionRecur/Create.php +++ b/api/v3/examples/ContributionRecur/Create.php @@ -62,6 +62,7 @@ function contribution_recur_create_expectedresult() { 'create_date' => '20120130621222105', 'modified_date' => '2012-11-14 16:02:35', 'cancel_date' => '', + 'cancel_reason' => '', 'end_date' => '', 'processor_id' => '', 'payment_token_id' => '', @@ -93,17 +94,17 @@ function contribution_recur_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionRecurTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ContributionRecur/Delete.php b/api/v3/examples/ContributionRecur/Delete.php index d27fe4de88..52e8b6482b 100644 --- a/api/v3/examples/ContributionRecur/Delete.php +++ b/api/v3/examples/ContributionRecur/Delete.php @@ -54,17 +54,17 @@ function contribution_recur_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionRecurTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ContributionRecur/Get.php b/api/v3/examples/ContributionRecur/Get.php index de3ae05666..ce054103fc 100644 --- a/api/v3/examples/ContributionRecur/Get.php +++ b/api/v3/examples/ContributionRecur/Get.php @@ -74,17 +74,17 @@ function contribution_recur_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionRecurTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ContributionSoft/Create.php b/api/v3/examples/ContributionSoft/Create.php index 523683a58f..83a46b9e67 100644 --- a/api/v3/examples/ContributionSoft/Create.php +++ b/api/v3/examples/ContributionSoft/Create.php @@ -72,17 +72,17 @@ function contribution_soft_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionSoftTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ContributionSoft/Delete.php b/api/v3/examples/ContributionSoft/Delete.php index 5c663ddaa4..8bf895bebd 100644 --- a/api/v3/examples/ContributionSoft/Delete.php +++ b/api/v3/examples/ContributionSoft/Delete.php @@ -37,7 +37,12 @@ function contribution_soft_delete_example() { */ function contribution_soft_delete_expectedresult() { - $expectedResult = ''; + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'values' => 1, + ]; return $expectedResult; } @@ -49,17 +54,17 @@ function contribution_soft_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionSoftTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ContributionSoft/Get.php b/api/v3/examples/ContributionSoft/Get.php index 00f58d7e95..1ac873f42f 100644 --- a/api/v3/examples/ContributionSoft/Get.php +++ b/api/v3/examples/ContributionSoft/Get.php @@ -65,17 +65,17 @@ function contribution_soft_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionSoftTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Country/Create.php b/api/v3/examples/Country/Create.php index 1d76d52b87..ab03f90864 100644 --- a/api/v3/examples/Country/Create.php +++ b/api/v3/examples/Country/Create.php @@ -69,17 +69,17 @@ function country_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CountryTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Country/Delete.php b/api/v3/examples/Country/Delete.php index 07676caec1..691d99a2c6 100644 --- a/api/v3/examples/Country/Delete.php +++ b/api/v3/examples/Country/Delete.php @@ -54,17 +54,17 @@ function country_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CountryTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Country/Get.php b/api/v3/examples/Country/Get.php index 7ff1292414..827b2c5c0d 100644 --- a/api/v3/examples/Country/Get.php +++ b/api/v3/examples/Country/Get.php @@ -63,17 +63,17 @@ function country_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CountryTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/CustomField/Create.php b/api/v3/examples/CustomField/Create.php index a29f9842cb..1d622aa3de 100644 --- a/api/v3/examples/CustomField/Create.php +++ b/api/v3/examples/CustomField/Create.php @@ -97,17 +97,17 @@ function custom_field_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/CustomField/Delete.php b/api/v3/examples/CustomField/Delete.php index 90c6985ef0..6ea27931d3 100644 --- a/api/v3/examples/CustomField/Delete.php +++ b/api/v3/examples/CustomField/Delete.php @@ -54,17 +54,17 @@ function custom_field_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/CustomGroup/Create.php b/api/v3/examples/CustomGroup/Create.php index 950622f0ea..99787e2640 100644 --- a/api/v3/examples/CustomGroup/Create.php +++ b/api/v3/examples/CustomGroup/Create.php @@ -74,6 +74,7 @@ function custom_group_create_expectedresult() { 'created_id' => '', 'created_date' => '', 'is_reserved' => '', + 'is_public' => '', ], ], ]; @@ -88,17 +89,17 @@ function custom_group_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomGroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/CustomGroup/Delete.php b/api/v3/examples/CustomGroup/Delete.php index d05b071399..f09b053b27 100644 --- a/api/v3/examples/CustomGroup/Delete.php +++ b/api/v3/examples/CustomGroup/Delete.php @@ -54,17 +54,17 @@ function custom_group_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomGroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/CustomGroup/Get.php b/api/v3/examples/CustomGroup/Get.php index 1ed12b4930..29cc2f521b 100644 --- a/api/v3/examples/CustomGroup/Get.php +++ b/api/v3/examples/CustomGroup/Get.php @@ -56,6 +56,7 @@ function custom_group_get_expectedresult() { 'is_multiple' => 0, 'collapse_adv_display' => 0, 'is_reserved' => 0, + 'is_public' => '1', ], ], ]; @@ -70,17 +71,17 @@ function custom_group_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomGroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Domain/Create.php b/api/v3/examples/Domain/Create.php index 328446478e..85b9fb6dbe 100644 --- a/api/v3/examples/Domain/Create.php +++ b/api/v3/examples/Domain/Create.php @@ -10,7 +10,7 @@ function domain_create_example() { 'name' => 'A-team domain', 'description' => 'domain of chaos', 'domain_version' => '4.2', - 'contact_id' => 6, + 'contact_id' => 7, ]; try{ @@ -51,7 +51,7 @@ function domain_create_expectedresult() { 'name' => 'A-team domain', 'description' => 'domain of chaos', 'config_backend' => '', - 'contact_id' => '6', + 'contact_id' => '7', 'locales' => '', 'locale_custom_strings' => '', 'domain_version' => '4.2', @@ -69,17 +69,17 @@ function domain_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/DomainTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Domain/Get.php b/api/v3/examples/Domain/Get.php index 8ea402bbaa..9ccfc284cd 100644 --- a/api/v3/examples/Domain/Get.php +++ b/api/v3/examples/Domain/Get.php @@ -65,8 +65,8 @@ function domain_get_expectedresult() { 'geo_code_1' => '', 'geo_code_2' => '', ], - 'from_email' => 'info@EXAMPLE.ORG', 'from_name' => 'FIXME', + 'from_email' => 'info@EXAMPLE.ORG', 'domain_version' => '4.6.alpha1', ], '1' => [ @@ -91,8 +91,8 @@ function domain_get_expectedresult() { 'geo_code_1' => '41.8328', 'geo_code_2' => '-72.9253', ], - 'from_email' => 'info@EXAMPLE.ORG', 'from_name' => 'FIXME', + 'from_email' => 'info@EXAMPLE.ORG', 'domain_version' => '4.6.alpha1', ], ], @@ -108,17 +108,17 @@ function domain_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/DomainTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Email/Create.php b/api/v3/examples/Email/Create.php index 98abb059d1..b2db488cab 100644 --- a/api/v3/examples/Email/Create.php +++ b/api/v3/examples/Email/Create.php @@ -7,10 +7,9 @@ */ function email_create_example() { $params = [ - 'contact_id' => 3, - 'location_type_id' => 6, + 'contact_id' => 23, 'email' => 'api@a-team.com', - 'is_primary' => 1, + 'on_hold' => '2', ]; try{ @@ -44,18 +43,18 @@ function email_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 26, 'values' => [ - '3' => [ - 'id' => '3', - 'contact_id' => '3', - 'location_type_id' => '6', + '26' => [ + 'id' => '26', + 'contact_id' => '23', + 'location_type_id' => '1', 'email' => 'api@a-team.com', 'is_primary' => '1', 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => '2', 'is_bulkmail' => '', - 'hold_date' => '', + 'hold_date' => '20190820191652', 'reset_date' => '', 'signature_text' => '', 'signature_html' => '', @@ -68,22 +67,22 @@ function email_create_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testCreateEmail" +* The test that created it is called "testEmailOnHold" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EmailTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Email/Delete.php b/api/v3/examples/Email/Delete.php index 4f10a208cb..b872078fc5 100644 --- a/api/v3/examples/Email/Delete.php +++ b/api/v3/examples/Email/Delete.php @@ -7,7 +7,7 @@ */ function email_delete_example() { $params = [ - 'id' => 11, + 'id' => 12, ]; try{ @@ -54,17 +54,17 @@ function email_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EmailTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Email/Replace.php b/api/v3/examples/Email/Replace.php index f85feea547..4623896d51 100644 --- a/api/v3/examples/Email/Replace.php +++ b/api/v3/examples/Email/Replace.php @@ -7,30 +7,30 @@ */ function email_replace_example() { $params = [ - 'contact_id' => 9, + 'contact_id' => 17, 'values' => [ '0' => [ - 'location_type_id' => 18, + 'location_type_id' => 34, 'email' => '1-1@example.com', 'is_primary' => 1, ], '1' => [ - 'location_type_id' => 18, + 'location_type_id' => 34, 'email' => '1-2@example.com', 'is_primary' => 0, ], '2' => [ - 'location_type_id' => 18, + 'location_type_id' => 34, 'email' => '1-3@example.com', 'is_primary' => 0, ], '3' => [ - 'location_type_id' => 19, + 'location_type_id' => 35, 'email' => '2-1@example.com', 'is_primary' => 0, ], '4' => [ - 'location_type_id' => 19, + 'location_type_id' => 35, 'email' => '2-2@example.com', 'is_primary' => 0, ], @@ -69,70 +69,70 @@ function email_replace_expectedresult() { 'version' => 3, 'count' => 5, 'values' => [ - '12' => [ - 'id' => '12', - 'contact_id' => '9', - 'location_type_id' => '18', + '13' => [ + 'id' => '13', + 'contact_id' => '17', + 'location_type_id' => '34', 'email' => '1-1@example.com', 'is_primary' => '1', 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', 'signature_text' => '', 'signature_html' => '', ], - '13' => [ - 'id' => '13', - 'contact_id' => '9', - 'location_type_id' => '18', + '14' => [ + 'id' => '14', + 'contact_id' => '17', + 'location_type_id' => '34', 'email' => '1-2@example.com', 'is_primary' => 0, 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', 'signature_text' => '', 'signature_html' => '', ], - '14' => [ - 'id' => '14', - 'contact_id' => '9', - 'location_type_id' => '18', + '15' => [ + 'id' => '15', + 'contact_id' => '17', + 'location_type_id' => '34', 'email' => '1-3@example.com', 'is_primary' => 0, 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', 'signature_text' => '', 'signature_html' => '', ], - '15' => [ - 'id' => '15', - 'contact_id' => '9', - 'location_type_id' => '19', + '16' => [ + 'id' => '16', + 'contact_id' => '17', + 'location_type_id' => '35', 'email' => '2-1@example.com', 'is_primary' => 0, 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', 'signature_text' => '', 'signature_html' => '', ], - '16' => [ - 'id' => '16', - 'contact_id' => '9', - 'location_type_id' => '19', + '17' => [ + 'id' => '17', + 'contact_id' => '17', + 'location_type_id' => '35', 'email' => '2-2@example.com', 'is_primary' => 0, 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', @@ -152,17 +152,17 @@ function email_replace_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EmailTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/EntityBatch/Create.php b/api/v3/examples/EntityBatch/Create.php index 71bf9bbf30..b2039d6d94 100644 --- a/api/v3/examples/EntityBatch/Create.php +++ b/api/v3/examples/EntityBatch/Create.php @@ -64,17 +64,17 @@ function entity_batch_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EntityBatchTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/EntityBatch/Delete.php b/api/v3/examples/EntityBatch/Delete.php index af39a1564b..1c195417e6 100644 --- a/api/v3/examples/EntityBatch/Delete.php +++ b/api/v3/examples/EntityBatch/Delete.php @@ -54,17 +54,17 @@ function entity_batch_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EntityBatchTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/EntityBatch/Get.php b/api/v3/examples/EntityBatch/Get.php index fbe65d197a..20044f5e62 100644 --- a/api/v3/examples/EntityBatch/Get.php +++ b/api/v3/examples/EntityBatch/Get.php @@ -64,17 +64,17 @@ function entity_batch_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EntityBatchTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/EntityTag/Delete.php b/api/v3/examples/EntityTag/Delete.php index f79f4925ef..51ecc823bb 100644 --- a/api/v3/examples/EntityTag/Delete.php +++ b/api/v3/examples/EntityTag/Delete.php @@ -7,8 +7,8 @@ */ function entity_tag_delete_example() { $params = [ - 'contact_id_h' => 31, - 'tag_id' => '15', + 'contact_id_h' => 43, + 'tag_id' => '19', ]; try{ @@ -55,17 +55,17 @@ function entity_tag_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EntityTagTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/EntityTag/Get.php b/api/v3/examples/EntityTag/Get.php index 94bb042ccc..5312259a60 100644 --- a/api/v3/examples/EntityTag/Get.php +++ b/api/v3/examples/EntityTag/Get.php @@ -7,7 +7,7 @@ */ function entity_tag_get_example() { $params = [ - 'contact_id' => 15, + 'contact_id' => 18, ]; try{ @@ -46,8 +46,8 @@ function entity_tag_get_expectedresult() { '5' => [ 'id' => '5', 'entity_table' => 'civicrm_contact', - 'entity_id' => '15', - 'tag_id' => '10', + 'entity_id' => '18', + 'tag_id' => '11', ], ], ]; @@ -62,17 +62,17 @@ function entity_tag_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EntityTagTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Event/ContactRefCustomField.php b/api/v3/examples/Event/ContactRefCustomField.php index 776dcc35a7..a492401dee 100644 --- a/api/v3/examples/Event/ContactRefCustomField.php +++ b/api/v3/examples/Event/ContactRefCustomField.php @@ -93,17 +93,17 @@ function event_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Event/Create.php b/api/v3/examples/Event/Create.php index b94693c427..0a9977424c 100644 --- a/api/v3/examples/Event/Create.php +++ b/api/v3/examples/Event/Create.php @@ -141,17 +141,17 @@ function event_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Event/Delete.php b/api/v3/examples/Event/Delete.php index 9e50397cca..99e53f4ab0 100644 --- a/api/v3/examples/Event/Delete.php +++ b/api/v3/examples/Event/Delete.php @@ -54,17 +54,17 @@ function event_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Event/Get.php b/api/v3/examples/Event/Get.php index a616f289f2..5eb8a9e871 100644 --- a/api/v3/examples/Event/Get.php +++ b/api/v3/examples/Event/Get.php @@ -88,17 +88,17 @@ function event_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Event/IsCurrentOption.php b/api/v3/examples/Event/IsCurrentOption.php index 1c3cc7f06b..c43d238240 100644 --- a/api/v3/examples/Event/IsCurrentOption.php +++ b/api/v3/examples/Event/IsCurrentOption.php @@ -96,17 +96,17 @@ function event_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Event/IsFullOption.php b/api/v3/examples/Event/IsFullOption.php index 4afe21ddc2..6954a283eb 100644 --- a/api/v3/examples/Event/IsFullOption.php +++ b/api/v3/examples/Event/IsFullOption.php @@ -67,7 +67,7 @@ function event_getsingle_expectedresult() { 'allow_selfcancelxfer' => 0, 'selfcancelxfer_time' => 0, 'is_template' => 0, - 'created_date' => '2017-02-07 02:22:22', + 'created_date' => '2019-08-20 19:17:20', 'is_share' => '1', 'is_confirm_enabled' => '1', 'is_billing_required' => 0, @@ -85,17 +85,17 @@ function event_getsingle_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Grant/Create.php b/api/v3/examples/Grant/Create.php index ceb0dd71ce..80c79bab87 100644 --- a/api/v3/examples/Grant/Create.php +++ b/api/v3/examples/Grant/Create.php @@ -80,17 +80,17 @@ function grant_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GrantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Grant/Delete.php b/api/v3/examples/Grant/Delete.php index 4c0222a01e..8ef84ffc35 100644 --- a/api/v3/examples/Grant/Delete.php +++ b/api/v3/examples/Grant/Delete.php @@ -54,17 +54,17 @@ function grant_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GrantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Grant/Get.php b/api/v3/examples/Grant/Get.php index a85ffc2317..16692d60bf 100644 --- a/api/v3/examples/Grant/Get.php +++ b/api/v3/examples/Grant/Get.php @@ -45,7 +45,7 @@ function grant_get_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '5', + 'contact_id' => '3', 'application_received_date' => '20130728084957', 'decision_date' => '20130805000000', 'grant_type_id' => '1', @@ -67,17 +67,17 @@ function grant_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GrantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Group/Get.php b/api/v3/examples/Group/Get.php index 9c6f7c0e14..f2a35bf736 100644 --- a/api/v3/examples/Group/Get.php +++ b/api/v3/examples/Group/Get.php @@ -41,18 +41,18 @@ function group_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 4, + 'id' => 1, 'values' => [ - '4' => [ - 'id' => '4', + '1' => [ + 'id' => '1', 'name' => 'Test Group 1', 'title' => 'New Test Group Created', 'description' => 'New Test Group Created', 'is_active' => '1', 'visibility' => 'Public Pages', - 'where_clause' => ' ( `civicrm_group_contact-4`.group_id IN ( 4 ) ) ', - 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";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-4`\";s:165:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-4` ON (contact_a.id = `civicrm_group_contact-4`.contact_id AND `civicrm_group_contact-4`.status IN (\'Added\'))\";}', - 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:25:\"`civicrm_group_contact-4`\";s:165:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-4` ON (contact_a.id = `civicrm_group_contact-4`.contact_id AND `civicrm_group_contact-4`.status IN (\'Added\'))\";}', + 'where_clause' => ' ( ( ( `civicrm_group_contact-5d5bbacea0631`.group_id IN (\"1\") ) ) ) ', + 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";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:37:\"`civicrm_group_contact-5d5bbacea0631`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbacea0631` ON (contact_a.id = `civicrm_group_contact-5d5bbacea0631`.contact_id AND `civicrm_group_contact-5d5bbacea0631`.status IN (\'Added\'))\";}', + 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:37:\"`civicrm_group_contact-5d5bbacea0631`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbacea0631` ON (contact_a.id = `civicrm_group_contact-5d5bbacea0631`.contact_id AND `civicrm_group_contact-5d5bbacea0631`.status IN (\'Added\'))\";}', 'group_type' => [ '0' => '1', '1' => '2', @@ -73,17 +73,17 @@ function group_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Group/GetFields.php b/api/v3/examples/Group/GetFields.php index a93b6f8754..09d09af2a4 100644 --- a/api/v3/examples/Group/GetFields.php +++ b/api/v3/examples/Group/GetFields.php @@ -50,9 +50,12 @@ function group_getfields_expectedresult() { 'title' => 'Group ID', 'description' => 'Group ID', 'required' => TRUE, + 'where' => 'civicrm_group.id', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'group_id', ], @@ -64,9 +67,12 @@ function group_getfields_expectedresult() { 'description' => 'Internal name of Group.', 'maxlength' => 64, 'size' => 30, + 'where' => 'civicrm_group.name', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'title' => [ 'name' => 'title', @@ -75,9 +81,17 @@ function group_getfields_expectedresult() { 'description' => 'Name of Group.', 'maxlength' => 64, 'size' => 30, + 'where' => 'civicrm_group.title', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 1, + 'html' => [ + 'type' => 'Text', + 'maxlength' => 64, + 'size' => 30, + ], + 'is_core_field' => TRUE, 'api.required' => 1, ], 'description' => [ @@ -87,14 +101,17 @@ function group_getfields_expectedresult() { 'description' => 'Optional verbose description of the group.', 'rows' => 2, 'cols' => 60, + 'where' => 'civicrm_group.description', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, 'html' => [ 'type' => 'TextArea', 'rows' => 2, 'cols' => 60, ], + 'is_core_field' => TRUE, ], 'source' => [ 'name' => 'source', @@ -103,19 +120,25 @@ function group_getfields_expectedresult() { 'description' => 'Module or process which created this group.', 'maxlength' => 64, 'size' => 30, + 'where' => 'civicrm_group.source', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'saved_search_id' => [ 'name' => 'saved_search_id', 'type' => 1, 'title' => 'Saved Search ID', 'description' => 'FK to saved search table.', + 'where' => 'civicrm_group.saved_search_id', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_SavedSearch', + 'is_core_field' => TRUE, 'FKApiName' => 'SavedSearch', ], 'is_active' => [ @@ -123,9 +146,12 @@ function group_getfields_expectedresult() { 'type' => 16, 'title' => 'Group Enabled', 'description' => 'Is this entry active?', + 'where' => 'civicrm_group.is_active', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'is_core_field' => TRUE, 'api.default' => 1, ], 'visibility' => [ @@ -135,10 +161,12 @@ function group_getfields_expectedresult() { 'description' => 'In what context(s) is this field visible.', 'maxlength' => 24, 'size' => 20, + 'where' => 'civicrm_group.visibility', 'default' => 'User and User Admin Only', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'maxlength' => 24, @@ -147,33 +175,45 @@ function group_getfields_expectedresult() { 'pseudoconstant' => [ 'callback' => 'CRM_Core_SelectValues::groupVisibility', ], + 'is_core_field' => TRUE, ], 'where_clause' => [ 'name' => 'where_clause', 'type' => 32, 'title' => 'Group Where Clause', 'description' => 'the sql where clause if a saved search acl', + 'where' => 'civicrm_group.where_clause', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'select_tables' => [ 'name' => 'select_tables', 'type' => 32, 'title' => 'Tables For Select Clause', 'description' => 'the tables to be included in a select data', + 'where' => 'civicrm_group.select_tables', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'serialize' => 4, + 'is_core_field' => TRUE, ], 'where_tables' => [ 'name' => 'where_tables', 'type' => 32, 'title' => 'Tables For Where Clause', 'description' => 'the tables to be included in the count statement', + 'where' => 'civicrm_group.where_tables', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'serialize' => 4, + 'is_core_field' => TRUE, ], 'group_type' => [ 'name' => 'group_type', @@ -182,13 +222,17 @@ function group_getfields_expectedresult() { 'description' => 'FK to group type', 'maxlength' => 128, 'size' => 45, + 'where' => 'civicrm_group.group_type', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'serialize' => 1, 'pseudoconstant' => [ 'optionGroupName' => 'group_type', 'optionEditPath' => 'civicrm/admin/options/group_type', ], + 'is_core_field' => TRUE, ], 'cache_date' => [ 'name' => 'cache_date', @@ -196,9 +240,12 @@ function group_getfields_expectedresult() { 'title' => 'Group Cache Date', 'description' => 'Date when we created the cache for a smart group', 'required' => '', + 'where' => 'civicrm_group.cache_date', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'refresh_date' => [ 'name' => 'refresh_date', @@ -206,54 +253,76 @@ function group_getfields_expectedresult() { 'title' => 'Next Group Refresh Time', 'description' => 'Date and time when we need to refresh the cache next.', 'required' => '', + 'where' => 'civicrm_group.refresh_date', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'parents' => [ 'name' => 'parents', 'type' => 32, 'title' => 'Group Parents', 'description' => 'IDs of the parent(s)', + 'where' => 'civicrm_group.parents', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'serialize' => 5, + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_PseudoConstant::allGroup', + ], + 'is_core_field' => TRUE, ], 'children' => [ 'name' => 'children', 'type' => 32, 'title' => 'Group Children', 'description' => 'IDs of the child(ren)', + 'where' => 'civicrm_group.children', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'is_hidden' => [ 'name' => 'is_hidden', 'type' => 16, 'title' => 'Group is Hidden', 'description' => 'Is this group hidden?', + 'where' => 'civicrm_group.is_hidden', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'is_reserved' => [ 'name' => 'is_reserved', 'type' => 16, 'title' => 'Group is Reserved', + 'where' => 'civicrm_group.is_reserved', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'created_id' => [ 'name' => 'created_id', 'type' => 1, 'title' => 'Group Created By', 'description' => 'FK to contact table.', + 'where' => 'civicrm_group.created_id', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'is_core_field' => TRUE, 'FKApiName' => 'Contact', ], 'modified_id' => [ @@ -261,10 +330,13 @@ function group_getfields_expectedresult() { 'type' => 1, 'title' => 'Group Modified By', 'description' => 'FK to contact table.', + 'where' => 'civicrm_group.modified_id', 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'is_core_field' => TRUE, 'FKApiName' => 'Contact', ], ], @@ -280,17 +352,17 @@ function group_getfields_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/GroupContact/Create.php b/api/v3/examples/GroupContact/Create.php index 4f8eff192c..afb9496b78 100644 --- a/api/v3/examples/GroupContact/Create.php +++ b/api/v3/examples/GroupContact/Create.php @@ -59,17 +59,17 @@ function group_contact_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/GroupContact/Delete.php b/api/v3/examples/GroupContact/Delete.php index b87de53d2a..0f4db2245f 100644 --- a/api/v3/examples/GroupContact/Delete.php +++ b/api/v3/examples/GroupContact/Delete.php @@ -58,17 +58,17 @@ function group_contact_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/GroupContact/Get.php b/api/v3/examples/GroupContact/Get.php index a8dda828c6..e7718d5511 100644 --- a/api/v3/examples/GroupContact/Get.php +++ b/api/v3/examples/GroupContact/Get.php @@ -65,17 +65,17 @@ function group_contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/GroupContact/GetWithGroupID.php b/api/v3/examples/GroupContact/GetWithGroupID.php index e60f16df58..2607a81f7f 100644 --- a/api/v3/examples/GroupContact/GetWithGroupID.php +++ b/api/v3/examples/GroupContact/GetWithGroupID.php @@ -65,9 +65,9 @@ function group_contact_get_expectedresult() { 'description' => 'New Test Group Created', 'is_active' => '1', 'visibility' => 'Public Pages', - 'where_clause' => ' ( `civicrm_group_contact-3`.group_id IN ( 3 ) ) ', - 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";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-3`\";s:165:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-3` ON (contact_a.id = `civicrm_group_contact-3`.contact_id AND `civicrm_group_contact-3`.status IN (\'Added\'))\";}', - 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:25:\"`civicrm_group_contact-3`\";s:165:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-3` ON (contact_a.id = `civicrm_group_contact-3`.contact_id AND `civicrm_group_contact-3`.status IN (\'Added\'))\";}', + 'where_clause' => ' ( ( ( `civicrm_group_contact-5d5bbabeb0cbd`.group_id IN (\"3\") ) ) ) ', + 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";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:37:\"`civicrm_group_contact-5d5bbabeb0cbd`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbabeb0cbd` ON (contact_a.id = `civicrm_group_contact-5d5bbabeb0cbd`.contact_id AND `civicrm_group_contact-5d5bbabeb0cbd`.status IN (\'Added\'))\";}', + 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:37:\"`civicrm_group_contact-5d5bbabeb0cbd`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbabeb0cbd` ON (contact_a.id = `civicrm_group_contact-5d5bbabeb0cbd`.contact_id AND `civicrm_group_contact-5d5bbabeb0cbd`.status IN (\'Added\'))\";}', 'group_type' => [ '0' => '1', '1' => '2', @@ -91,17 +91,17 @@ function group_contact_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupContactTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/GroupNesting/Create.php b/api/v3/examples/GroupNesting/Create.php index f450996409..a25f5bb463 100644 --- a/api/v3/examples/GroupNesting/Create.php +++ b/api/v3/examples/GroupNesting/Create.php @@ -42,9 +42,13 @@ function group_nesting_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 'is_error', + 'id' => 2, 'values' => [ - 'is_error' => 0, + '2' => [ + 'id' => '2', + 'child_group_id' => '3', + 'parent_group_id' => '1', + ], ], ]; @@ -58,17 +62,17 @@ function group_nesting_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupNestingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/GroupNesting/Delete.php b/api/v3/examples/GroupNesting/Delete.php index baaea1baaa..dc99c74c88 100644 --- a/api/v3/examples/GroupNesting/Delete.php +++ b/api/v3/examples/GroupNesting/Delete.php @@ -54,17 +54,17 @@ function group_nesting_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupNestingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/GroupNesting/Get.php b/api/v3/examples/GroupNesting/Get.php index 3e19ef53b1..40631a5cc3 100644 --- a/api/v3/examples/GroupNesting/Get.php +++ b/api/v3/examples/GroupNesting/Get.php @@ -62,17 +62,17 @@ function group_nesting_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupNestingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/GroupOrganization/Create.php b/api/v3/examples/GroupOrganization/Create.php index 1a66937578..9d812d508a 100644 --- a/api/v3/examples/GroupOrganization/Create.php +++ b/api/v3/examples/GroupOrganization/Create.php @@ -41,12 +41,14 @@ function group_organization_create_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 3, + 'count' => 1, 'id' => 3, 'values' => [ - 'id' => '3', - 'group_id' => '6', - 'organization_id' => '8', + '3' => [ + 'id' => '3', + 'group_id' => '6', + 'organization_id' => '8', + ], ], ]; @@ -60,17 +62,17 @@ function group_organization_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupOrganizationTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/GroupOrganization/Delete.php b/api/v3/examples/GroupOrganization/Delete.php index 79f776f3b0..722934bf19 100644 --- a/api/v3/examples/GroupOrganization/Delete.php +++ b/api/v3/examples/GroupOrganization/Delete.php @@ -54,17 +54,17 @@ function group_organization_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupOrganizationTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/GroupOrganization/Get.php b/api/v3/examples/GroupOrganization/Get.php index 1ebfc68c3f..500c215a79 100644 --- a/api/v3/examples/GroupOrganization/Get.php +++ b/api/v3/examples/GroupOrganization/Get.php @@ -54,17 +54,17 @@ function group_organization_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupOrganizationTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Im/Create.php b/api/v3/examples/Im/Create.php index c32a2ea5f8..dda5c2ccf6 100644 --- a/api/v3/examples/Im/Create.php +++ b/api/v3/examples/Im/Create.php @@ -7,9 +7,8 @@ */ function im_create_example() { $params = [ - 'contact_id' => 3, + 'contact_id' => 5, 'name' => 'My Yahoo IM Handle', - 'location_type_id' => 1, 'provider_id' => 1, ]; @@ -44,11 +43,11 @@ function im_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 2, 'values' => [ - '1' => [ - 'id' => '1', - 'contact_id' => '3', + '2' => [ + 'id' => '2', + 'contact_id' => '5', 'location_type_id' => '1', 'name' => 'My Yahoo IM Handle', 'provider_id' => '1', @@ -63,22 +62,22 @@ function im_create_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testCreateIm" +* The test that created it is called "testCreateImDefaultLocation" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ImTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Im/Delete.php b/api/v3/examples/Im/Delete.php index 81438d7302..975bfac70b 100644 --- a/api/v3/examples/Im/Delete.php +++ b/api/v3/examples/Im/Delete.php @@ -7,7 +7,7 @@ */ function im_delete_example() { $params = [ - 'id' => 3, + 'id' => 4, ]; try{ @@ -54,17 +54,17 @@ function im_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ImTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Im/Get.php b/api/v3/examples/Im/Get.php index 90d23fe359..e2cacaad3f 100644 --- a/api/v3/examples/Im/Get.php +++ b/api/v3/examples/Im/Get.php @@ -7,7 +7,7 @@ */ function im_get_example() { $params = [ - 'contact_id' => 4, + 'contact_id' => 7, 'name' => 'My Yahoo IM Handle', 'location_type_id' => 1, 'provider_id' => 1, @@ -44,11 +44,11 @@ function im_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 3, 'values' => [ - '2' => [ - 'id' => '2', - 'contact_id' => '4', + '3' => [ + 'id' => '3', + 'contact_id' => '7', 'location_type_id' => '1', 'name' => 'My Yahoo IM Handle', 'provider_id' => '1', @@ -68,17 +68,17 @@ function im_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ImTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Job/Clone.php b/api/v3/examples/Job/Clone.php new file mode 100644 index 0000000000..b2235b8854 --- /dev/null +++ b/api/v3/examples/Job/Clone.php @@ -0,0 +1,83 @@ + 31, + ]; + + try{ + $result = civicrm_api3('Job', 'clone', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function job_clone_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 32, + 'values' => [ + '32' => [ + 'id' => '32', + 'domain_id' => '1', + 'run_frequency' => 'Daily', + 'name' => 'API_Test_Job - Copy', + 'description' => 'A long description written by hand in cursive', + 'api_entity' => 'ApiTestEntity', + 'api_action' => 'apitestaction', + 'parameters' => 'Semi-formal explanation of runtime job parameters', + 'is_active' => '1', + ], + ], + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testClone" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/JobTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/Job/Create.php b/api/v3/examples/Job/Create.php index 3e64c91d75..5109836ee9 100644 --- a/api/v3/examples/Job/Create.php +++ b/api/v3/examples/Job/Create.php @@ -76,17 +76,17 @@ function job_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/JobTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Job/Delete.php b/api/v3/examples/Job/Delete.php index 3fb1143598..6bbd95169a 100644 --- a/api/v3/examples/Job/Delete.php +++ b/api/v3/examples/Job/Delete.php @@ -7,7 +7,7 @@ */ function job_delete_example() { $params = [ - 'id' => 31, + 'id' => 33, ]; try{ @@ -49,17 +49,17 @@ function job_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/JobTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/LineItem/Create.php b/api/v3/examples/LineItem/Create.php index 44d2276096..050bcfa25d 100644 --- a/api/v3/examples/LineItem/Create.php +++ b/api/v3/examples/LineItem/Create.php @@ -79,17 +79,17 @@ function line_item_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LineItemTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/LineItem/Delete.php b/api/v3/examples/LineItem/Delete.php index 2381abb562..a84be8f560 100644 --- a/api/v3/examples/LineItem/Delete.php +++ b/api/v3/examples/LineItem/Delete.php @@ -54,17 +54,17 @@ function line_item_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LineItemTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/LineItem/Get.php b/api/v3/examples/LineItem/Get.php index 68a319605b..2e5d7fa2ec 100644 --- a/api/v3/examples/LineItem/Get.php +++ b/api/v3/examples/LineItem/Get.php @@ -71,17 +71,17 @@ function line_item_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LineItemTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/LocBlock/Create.php b/api/v3/examples/LocBlock/Create.php index 723137931c..b752ec02a6 100644 --- a/api/v3/examples/LocBlock/Create.php +++ b/api/v3/examples/LocBlock/Create.php @@ -71,17 +71,17 @@ function loc_block_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LocBlockTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/LocBlock/CreateEntities.php b/api/v3/examples/LocBlock/CreateEntities.php index 2cb6213339..1ac4588448 100644 --- a/api/v3/examples/LocBlock/CreateEntities.php +++ b/api/v3/examples/LocBlock/CreateEntities.php @@ -76,7 +76,7 @@ function loc_block_create_expectedresult() { 'email' => 'test2@loc.block', 'is_primary' => 0, 'is_billing' => '', - 'on_hold' => '', + 'on_hold' => 0, 'is_bulkmail' => '', 'hold_date' => '', 'reset_date' => '', @@ -130,17 +130,17 @@ function loc_block_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LocBlockTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/LocBlock/Get.php b/api/v3/examples/LocBlock/Get.php index dccde31f7b..926c03d45e 100644 --- a/api/v3/examples/LocBlock/Get.php +++ b/api/v3/examples/LocBlock/Get.php @@ -99,17 +99,17 @@ function loc_block_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LocBlockTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Logging/Get.php b/api/v3/examples/Logging/Get.php index f6d921898b..a0a26f4c25 100644 --- a/api/v3/examples/Logging/Get.php +++ b/api/v3/examples/Logging/Get.php @@ -49,7 +49,7 @@ function logging_get_expectedresult() { 'from' => 'Anderson, Anthony', 'to' => 'Dwarf, Dopey', 'table' => 'civicrm_contact', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:24', 'log_conn_id' => 'wooty wop wop', ], '1' => [ @@ -59,7 +59,7 @@ function logging_get_expectedresult() { 'from' => 'Mr. Anthony Anderson II', 'to' => 'Mr. Dopey Dwarf II', 'table' => 'civicrm_contact', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:24', 'log_conn_id' => 'wooty wop wop', ], '2' => [ @@ -69,7 +69,7 @@ function logging_get_expectedresult() { 'from' => 'Anthony', 'to' => 'Dopey', 'table' => 'civicrm_contact', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:24', 'log_conn_id' => 'wooty wop wop', ], '3' => [ @@ -79,17 +79,17 @@ function logging_get_expectedresult() { 'from' => 'Anderson', 'to' => 'Dwarf', 'table' => 'civicrm_contact', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:24', 'log_conn_id' => 'wooty wop wop', ], '4' => [ 'action' => 'Update', 'id' => '3', 'field' => 'modified_date', - 'from' => '2017-02-07 02:36:28', - 'to' => '2017-02-07 02:36:46', + 'from' => '2019-08-20 19:23:20', + 'to' => '2019-08-20 19:23:24', 'table' => 'civicrm_contact', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:24', 'log_conn_id' => 'wooty wop wop', ], '5' => [ @@ -99,7 +99,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '2', 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '6' => [ @@ -109,7 +109,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '3', 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '7' => [ @@ -117,9 +117,9 @@ function logging_get_expectedresult() { 'id' => '2', 'field' => 'location_type_id', 'from' => '', - 'to' => '', + 'to' => '1', 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '8' => [ @@ -129,7 +129,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => 'dopey@mail.com', 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '9' => [ @@ -139,7 +139,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '10' => [ @@ -149,7 +149,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '11' => [ @@ -159,7 +159,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '12' => [ @@ -169,7 +169,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '13' => [ @@ -179,7 +179,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '14' => [ @@ -189,7 +189,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '15' => [ @@ -199,7 +199,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], '16' => [ @@ -209,7 +209,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2017-02-07 02:36:46', + 'log_date' => '2019-08-20 19:23:25', 'log_conn_id' => 'wooty wop wop', ], ], @@ -225,17 +225,17 @@ function logging_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LoggingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Logging/Revert.php b/api/v3/examples/Logging/Revert.php index 01642fc870..32fa318ff2 100644 --- a/api/v3/examples/Logging/Revert.php +++ b/api/v3/examples/Logging/Revert.php @@ -8,7 +8,7 @@ function logging_revert_example() { $params = [ 'log_conn_id' => 'woot', - 'log_date' => '2017-02-07 02:35:06', + 'log_date' => '2019-08-20 19:22:48', ]; try{ @@ -50,22 +50,22 @@ function logging_revert_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "/Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/tests/phpunit/api/v3/LoggingTest.php" +* The test that created it is called "/home/seamus/buildkit/build/47-test/sites/all/modules/civicrm/tests/phpunit/api/v3/LoggingTest.php" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/Revert * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MailSettings/ChainedGetDelete.php b/api/v3/examples/MailSettings/ChainedGetDelete.php index 966d269684..b243259d28 100644 --- a/api/v3/examples/MailSettings/ChainedGetDelete.php +++ b/api/v3/examples/MailSettings/ChainedGetDelete.php @@ -9,7 +9,7 @@ */ function mail_settings_get_example() { $params = [ - 'title' => 'MailSettings title', + 'name' => 'delete this setting', 'api.MailSettings.delete' => 1, ]; @@ -43,27 +43,16 @@ function mail_settings_get_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 2, + 'count' => 1, + 'id' => 6, 'values' => [ - '1' => [ - 'id' => '1', - 'domain_id' => '1', - 'name' => 'default', - 'is_default' => 0, - 'domain' => 'EXAMPLE.ORG', - 'api.MailSettings.delete' => [ - 'is_error' => 0, - 'version' => 3, - 'count' => 1, - 'values' => 1, - ], - ], '6' => [ 'id' => '6', 'domain_id' => '1', - 'name' => 'my mail setting', + 'name' => 'delete this setting', 'is_default' => '1', 'domain' => 'setting.com', + 'localpart' => 'civicrm+', 'server' => 'localhost', 'username' => 'sue', 'password' => 'pass', @@ -88,17 +77,17 @@ function mail_settings_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailSettingsTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MailSettings/Create.php b/api/v3/examples/MailSettings/Create.php index 43fbf43856..08eba66597 100644 --- a/api/v3/examples/MailSettings/Create.php +++ b/api/v3/examples/MailSettings/Create.php @@ -10,7 +10,7 @@ function mail_settings_create_example() { 'domain_id' => 1, 'name' => 'my mail setting', 'domain' => 'setting.com', - 'local_part' => 'civicrm+', + 'localpart' => 'civicrm+', 'server' => 'localhost', 'username' => 'sue', 'password' => 'pass', @@ -56,7 +56,7 @@ function mail_settings_create_expectedresult() { 'name' => 'my mail setting', 'is_default' => '1', 'domain' => 'setting.com', - 'localpart' => '', + 'localpart' => 'civicrm+', 'return_path' => '', 'protocol' => '', 'server' => 'localhost', @@ -65,6 +65,7 @@ function mail_settings_create_expectedresult() { 'password' => 'pass', 'is_ssl' => '', 'source' => '', + 'activity_status' => '', ], ], ]; @@ -79,17 +80,17 @@ function mail_settings_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailSettingsTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MailSettings/Delete.php b/api/v3/examples/MailSettings/Delete.php index a1cc7a50b4..dbfc74cfc5 100644 --- a/api/v3/examples/MailSettings/Delete.php +++ b/api/v3/examples/MailSettings/Delete.php @@ -54,17 +54,17 @@ function mail_settings_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailSettingsTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MailSettings/Get.php b/api/v3/examples/MailSettings/Get.php index 19c75bb4be..42d80d7c2e 100644 --- a/api/v3/examples/MailSettings/Get.php +++ b/api/v3/examples/MailSettings/Get.php @@ -10,7 +10,7 @@ function mail_settings_get_example() { 'domain_id' => 1, 'name' => 'my mail setting', 'domain' => 'setting.com', - 'local_part' => 'civicrm+', + 'localpart' => 'civicrm+', 'server' => 'localhost', 'username' => 'sue', 'password' => 'pass', @@ -56,6 +56,7 @@ function mail_settings_get_expectedresult() { 'name' => 'my mail setting', 'is_default' => '1', 'domain' => 'setting.com', + 'localpart' => 'civicrm+', 'server' => 'localhost', 'username' => 'sue', 'password' => 'pass', @@ -74,17 +75,17 @@ function mail_settings_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailSettingsTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MailSettings/GetOptions.php b/api/v3/examples/MailSettings/GetOptions.php index 5a8de53942..a1c39a2fcb 100644 --- a/api/v3/examples/MailSettings/GetOptions.php +++ b/api/v3/examples/MailSettings/GetOptions.php @@ -59,17 +59,17 @@ function mail_settings_getoptions_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ConstantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Mailing/Clone.php b/api/v3/examples/Mailing/Clone.php index 7d5c86c2c5..46b12fa62b 100644 --- a/api/v3/examples/Mailing/Clone.php +++ b/api/v3/examples/Mailing/Clone.php @@ -7,7 +7,7 @@ */ function mailing_clone_example() { $params = [ - 'id' => 21, + 'id' => 27, ]; try{ @@ -41,10 +41,10 @@ function mailing_clone_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 22, + 'id' => 28, 'values' => [ - '22' => [ - 'id' => '22', + '28' => [ + 'id' => '28', 'domain_id' => '1', 'header_id' => '1', 'footer_id' => '2', @@ -63,7 +63,7 @@ function mailing_clone_expectedresult() { 'body_text' => 'This is {contact.display_name}. https://civicrm.org {domain.address}{action.optOutUrl}', - 'body_html' => '

This is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', + 'body_html' => '

Forward this emailForward this email with no protocolThis is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', 'url_tracking' => '1', 'forward_replies' => 0, 'auto_responder' => 0, @@ -71,15 +71,16 @@ https://civicrm.org 'is_completed' => '', 'msg_template_id' => '', 'override_verp' => '1', - 'created_id' => '147', + 'created_id' => '154', 'created_date' => '2013-07-28 08:49:19', + 'modified_date' => '2012-11-14 16:02:35', 'scheduled_id' => '', 'scheduled_date' => '', 'approver_id' => '', 'approval_date' => '', 'approval_status_id' => '', 'approval_note' => '', - 'is_archived' => '', + 'is_archived' => 0, 'visibility' => 'Public Pages', 'campaign_id' => '', 'dedupe_email' => '1', @@ -102,17 +103,17 @@ https://civicrm.org * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Mailing/Create.php b/api/v3/examples/Mailing/Create.php index 026d9fc2c1..6562c989a0 100644 --- a/api/v3/examples/Mailing/Create.php +++ b/api/v3/examples/Mailing/Create.php @@ -11,17 +11,17 @@ function mailing_create_example() { 'body_text' => 'This is {contact.display_name}. https://civicrm.org {domain.address}{action.optOutUrl}', - 'body_html' => '

This is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', + 'body_html' => '

Forward this emailForward this email with no protocolThis is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', 'name' => 'mailing name', - 'created_id' => 3, + 'created_id' => 15, 'header_id' => '', 'footer_id' => '', 'groups' => [ 'include' => [ - '0' => 2, + '0' => 13, ], 'exclude' => [ - '0' => 3, + '0' => 14, ], ], 'mailings' => [ @@ -31,7 +31,6 @@ https://civicrm.org 'options' => [ 'force_rollback' => 1, ], - 'api.mailing_job.create' => 1, 'api.MailingRecipients.get' => [ 'mailing_id' => '$value.id', 'api.contact.getvalue' => [ @@ -74,10 +73,10 @@ function mailing_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 9, 'values' => [ - '1' => [ - 'id' => '1', + '9' => [ + 'id' => '9', 'domain_id' => '1', 'header_id' => '', 'footer_id' => '', @@ -90,69 +89,49 @@ function mailing_create_expectedresult() { 'from_name' => 'FIXME', 'from_email' => 'info@EXAMPLE.ORG', 'replyto_email' => 'info@EXAMPLE.ORG', - 'template_type' => '', + 'template_type' => 'traditional', 'template_options' => '', 'subject' => 'Hello {contact.display_name}', 'body_text' => 'This is {contact.display_name}. https://civicrm.org {domain.address}{action.optOutUrl}', - 'body_html' => '

This is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', + 'body_html' => '

Forward this emailForward this email with no protocolThis is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', 'url_tracking' => '1', - 'forward_replies' => '', - 'auto_responder' => '', + 'forward_replies' => 0, + 'auto_responder' => 0, 'open_tracking' => '1', 'is_completed' => '', 'msg_template_id' => '', 'override_verp' => '1', - 'created_id' => '3', + 'created_id' => '15', 'created_date' => '2013-07-28 08:49:19', + 'modified_date' => '2012-11-14 16:02:35', 'scheduled_id' => '', 'scheduled_date' => '', 'approver_id' => '', 'approval_date' => '', 'approval_status_id' => '', 'approval_note' => '', - 'is_archived' => '', + 'is_archived' => 0, 'visibility' => 'Public Pages', 'campaign_id' => '', 'dedupe_email' => '1', 'sms_provider_id' => '', 'hash' => '', 'location_type_id' => '', - 'email_selection_method' => '', + 'email_selection_method' => 'automatic', 'language' => '', - 'api.mailing_job.create' => [ - 'is_error' => 0, - 'version' => 3, - 'count' => 1, - 'id' => 1, - 'values' => [ - '0' => [ - 'id' => '1', - 'mailing_id' => '1', - 'scheduled_date' => '20130728085413', - 'start_date' => '', - 'end_date' => '', - 'status' => 'Scheduled', - 'is_test' => 0, - 'job_type' => '', - 'parent_id' => '', - 'job_offset' => '', - 'job_limit' => '', - ], - ], - ], 'api.MailingRecipients.get' => [ 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 4, 'values' => [ '0' => [ - 'id' => '1', - 'mailing_id' => '1', - 'contact_id' => '4', - 'email_id' => '4', + 'id' => '4', + 'mailing_id' => '9', + 'contact_id' => '16', + 'email_id' => '16', 'api.contact.getvalue' => 'Mr. Includer Person II', 'api.email.getvalue' => 'include.me@example.org', ], @@ -172,17 +151,17 @@ https://civicrm.org * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Mailing/Delete.php b/api/v3/examples/Mailing/Delete.php index b2df37d02a..b0070b6eb4 100644 --- a/api/v3/examples/Mailing/Delete.php +++ b/api/v3/examples/Mailing/Delete.php @@ -7,7 +7,7 @@ */ function mailing_delete_example() { $params = [ - 'id' => 20, + 'id' => 26, ]; try{ @@ -54,17 +54,17 @@ function mailing_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Mailing/GetTokens.php b/api/v3/examples/Mailing/GetTokens.php index 856e279527..bc343a4237 100644 --- a/api/v3/examples/Mailing/GetTokens.php +++ b/api/v3/examples/Mailing/GetTokens.php @@ -46,7 +46,7 @@ function mailing_gettokens_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 82, + 'count' => 88, 'values' => [ '{action.unsubscribe}' => 'Unsubscribe via email', '{action.unsubscribeUrl}' => 'Unsubscribe via web page', @@ -88,6 +88,9 @@ function mailing_gettokens_expectedresult() { '{contact.individual_suffix}' => 'Individual Suffix', '{contact.formal_title}' => 'Formal Title', '{contact.communication_style}' => 'Communication Style', + '{contact.email_greeting_id}' => 'Email Greeting ID', + '{contact.postal_greeting_id}' => 'Postal Greeting ID', + '{contact.addressee_id}' => 'Addressee ID', '{contact.job_title}' => 'Job Title', '{contact.gender}' => 'Gender', '{contact.birth_date}' => 'Birth Date', @@ -113,6 +116,7 @@ function mailing_gettokens_expectedresult() { '{contact.postal_code}' => 'Postal Code', '{contact.geo_code_1}' => 'Latitude', '{contact.geo_code_2}' => 'Longitude', + '{contact.manual_geo_code}' => 'Is Manually Geocoded', '{contact.address_name}' => 'Address Name', '{contact.master_id}' => 'Master Address Belongs To', '{contact.county}' => 'County', @@ -120,6 +124,7 @@ function mailing_gettokens_expectedresult() { '{contact.country}' => 'Country', '{contact.phone}' => 'Phone', '{contact.phone_ext}' => 'Phone Extension', + '{contact.phone_type_id}' => 'Phone Type', '{contact.email}' => 'Email', '{contact.on_hold}' => 'On Hold', '{contact.signature_text}' => 'Signature Text', @@ -144,17 +149,17 @@ function mailing_gettokens_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Mailing/Submit.php b/api/v3/examples/Mailing/Submit.php index d2971de198..059ac070e7 100644 --- a/api/v3/examples/Mailing/Submit.php +++ b/api/v3/examples/Mailing/Submit.php @@ -9,7 +9,7 @@ function mailing_submit_example() { $params = [ 'scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00', - 'id' => 18, + 'id' => 22, ]; try{ @@ -43,13 +43,13 @@ function mailing_submit_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 18, + 'id' => 22, 'values' => [ - '18' => [ - 'id' => '18', + '22' => [ + 'id' => '22', 'domain_id' => '1', 'header_id' => '', - 'footer_id' => '27', + 'footer_id' => '31', 'reply_id' => '8', 'unsubscribe_id' => '5', 'resubscribe_id' => '6', @@ -73,11 +73,12 @@ https://civicrm.org 'is_completed' => '', 'msg_template_id' => '', 'override_verp' => '1', - 'created_id' => '40', + 'created_id' => '45', 'created_date' => '2013-07-28 08:49:19', - 'scheduled_id' => '41', + 'modified_date' => '2012-11-14 16:02:35', + 'scheduled_id' => '46', 'scheduled_date' => '20130728085413', - 'approver_id' => '41', + 'approver_id' => '46', 'approval_date' => '20130728085413', 'approval_status_id' => '1', 'approval_note' => '', @@ -104,17 +105,17 @@ https://civicrm.org * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MailingAB/Create.php b/api/v3/examples/MailingAB/Create.php index 735ad9ca37..8a53d6ca71 100644 --- a/api/v3/examples/MailingAB/Create.php +++ b/api/v3/examples/MailingAB/Create.php @@ -60,7 +60,7 @@ function mailing_a_b_create_expectedresult() { 'testing_criteria' => 'subject', 'winner_criteria' => 'open', 'specific_url' => '', - 'declare_winning_time' => '20170209023708', + 'declare_winning_time' => '20190822192332', 'group_percentage' => '10', 'created_id' => '3', 'created_date' => '2013-07-28 08:49:19', @@ -78,17 +78,17 @@ function mailing_a_b_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingABTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MailingEventSubscribe/Create.php b/api/v3/examples/MailingEventSubscribe/Create.php index a36db91cb5..01a5127b75 100644 --- a/api/v3/examples/MailingEventSubscribe/Create.php +++ b/api/v3/examples/MailingEventSubscribe/Create.php @@ -65,17 +65,17 @@ function mailing_event_subscribe_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingGroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Mapping/Create.php b/api/v3/examples/Mapping/Create.php index cfeb6060a5..4d5258489b 100644 --- a/api/v3/examples/Mapping/Create.php +++ b/api/v3/examples/Mapping/Create.php @@ -64,17 +64,17 @@ function mapping_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Mapping/Delete.php b/api/v3/examples/Mapping/Delete.php index 41b355bb33..33529d7cb3 100644 --- a/api/v3/examples/Mapping/Delete.php +++ b/api/v3/examples/Mapping/Delete.php @@ -54,17 +54,17 @@ function mapping_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Mapping/Get.php b/api/v3/examples/Mapping/Get.php index 2235f5075e..96161bb1d3 100644 --- a/api/v3/examples/Mapping/Get.php +++ b/api/v3/examples/Mapping/Get.php @@ -64,17 +64,17 @@ function mapping_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MappingField/Create.php b/api/v3/examples/MappingField/Create.php index 093863a69b..2841970b27 100644 --- a/api/v3/examples/MappingField/Create.php +++ b/api/v3/examples/MappingField/Create.php @@ -76,17 +76,17 @@ function mapping_field_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MappingField/Delete.php b/api/v3/examples/MappingField/Delete.php index ddc050529d..0dad4e6fd5 100644 --- a/api/v3/examples/MappingField/Delete.php +++ b/api/v3/examples/MappingField/Delete.php @@ -54,17 +54,17 @@ function mapping_field_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MappingField/Get.php b/api/v3/examples/MappingField/Get.php index 8fac202097..a2fa16de31 100644 --- a/api/v3/examples/MappingField/Get.php +++ b/api/v3/examples/MappingField/Get.php @@ -68,17 +68,17 @@ function mapping_field_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Membership/Create.php b/api/v3/examples/Membership/Create.php index 7285304133..091043fb85 100644 --- a/api/v3/examples/Membership/Create.php +++ b/api/v3/examples/Membership/Create.php @@ -7,14 +7,14 @@ */ function membership_create_example() { $params = [ - 'contact_id' => 79, - 'membership_type_id' => 47, + 'contact_id' => 3, + 'membership_type_id' => 1, 'join_date' => '2006-01-21', 'start_date' => '2006-01-21', 'end_date' => '2006-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 30, + 'status_id' => 31, ]; try{ @@ -52,14 +52,15 @@ function membership_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '79', - 'membership_type_id' => '47', + 'contact_id' => '3', + 'membership_type_id' => '1', 'join_date' => '20060121000000', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '30', + 'status_id' => '31', 'is_override' => '1', + 'status_override_end_date' => '', 'owner_membership_id' => '', 'max_related' => '', 'is_test' => 0, @@ -80,17 +81,17 @@ function membership_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Membership/CreateWithCustomData.php b/api/v3/examples/Membership/CreateWithCustomData.php index 13651a3c95..8a108197c9 100644 --- a/api/v3/examples/Membership/CreateWithCustomData.php +++ b/api/v3/examples/Membership/CreateWithCustomData.php @@ -7,14 +7,14 @@ */ function membership_create_example() { $params = [ - 'contact_id' => 91, - 'membership_type_id' => 55, + 'contact_id' => 3, + 'membership_type_id' => 1, 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 34, + 'status_id' => 35, 'custom_1' => 'custom string', ]; @@ -53,14 +53,15 @@ function membership_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '91', - 'membership_type_id' => '55', + 'contact_id' => '3', + 'membership_type_id' => '1', 'join_date' => '20090121000000', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '34', + 'status_id' => '35', 'is_override' => '1', + 'status_override_end_date' => '', 'owner_membership_id' => '', 'max_related' => '', 'is_test' => 0, @@ -81,17 +82,17 @@ function membership_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Membership/Delete.php b/api/v3/examples/Membership/Delete.php index 75e9066122..fdc16636eb 100644 --- a/api/v3/examples/Membership/Delete.php +++ b/api/v3/examples/Membership/Delete.php @@ -55,17 +55,17 @@ function membership_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Membership/FilterIsCurrent.php b/api/v3/examples/Membership/FilterIsCurrent.php index 6ab53bdccf..fba84157ee 100644 --- a/api/v3/examples/Membership/FilterIsCurrent.php +++ b/api/v3/examples/Membership/FilterIsCurrent.php @@ -9,7 +9,7 @@ */ function membership_get_example() { $params = [ - 'contact_id' => 47, + 'contact_id' => 3, 'filters' => [ 'is_current' => 1, ], @@ -50,13 +50,13 @@ function membership_get_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '47', - 'membership_type_id' => '29', + 'contact_id' => '3', + 'membership_type_id' => '1', 'join_date' => '2009-01-21', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '22', + 'status_id' => '23', 'is_override' => '1', 'is_test' => 0, 'is_pay_later' => 0, @@ -76,17 +76,17 @@ function membership_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Membership/Get.php b/api/v3/examples/Membership/Get.php index cb6c5aa4bb..1fb614344e 100644 --- a/api/v3/examples/Membership/Get.php +++ b/api/v3/examples/Membership/Get.php @@ -7,7 +7,7 @@ */ function membership_get_example() { $params = [ - 'membership_type_id' => 23, + 'membership_type_id' => 1, ]; try{ @@ -45,13 +45,13 @@ function membership_get_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '38', - 'membership_type_id' => '23', + 'contact_id' => '3', + 'membership_type_id' => '1', 'join_date' => '2009-01-21', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '19', + 'status_id' => '20', 'is_override' => '1', 'is_test' => 0, 'is_pay_later' => 0, @@ -73,17 +73,17 @@ function membership_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Membership/SearchWithCustomData.php b/api/v3/examples/Membership/SearchWithCustomData.php index be147d722d..b287131e78 100644 --- a/api/v3/examples/Membership/SearchWithCustomData.php +++ b/api/v3/examples/Membership/SearchWithCustomData.php @@ -7,14 +7,14 @@ */ function membership_create_example() { $params = [ - 'contact_id' => 94, - 'membership_type_id' => 57, + 'contact_id' => 3, + 'membership_type_id' => 1, 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 35, + 'status_id' => 36, ]; try{ @@ -52,14 +52,15 @@ function membership_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '94', - 'membership_type_id' => '57', + 'contact_id' => '3', + 'membership_type_id' => '1', 'join_date' => '20090121000000', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '35', + 'status_id' => '36', 'is_override' => '1', + 'status_override_end_date' => '', 'owner_membership_id' => '', 'max_related' => '', 'is_test' => 0, @@ -80,17 +81,17 @@ function membership_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Membership/UpdateCustomData.php b/api/v3/examples/Membership/UpdateCustomData.php index 2a10b8e713..243c5968ca 100644 --- a/api/v3/examples/Membership/UpdateCustomData.php +++ b/api/v3/examples/Membership/UpdateCustomData.php @@ -7,14 +7,14 @@ */ function membership_create_example() { $params = [ - 'contact_id' => 112, - 'membership_type_id' => 69, + 'contact_id' => 3, + 'membership_type_id' => 1, 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 41, + 'status_id' => 42, 'custom_1' => 'custom string', ]; @@ -53,14 +53,15 @@ function membership_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '112', - 'membership_type_id' => '69', + 'contact_id' => '3', + 'membership_type_id' => '1', 'join_date' => '20090121000000', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '41', + 'status_id' => '42', 'is_override' => '1', + 'status_override_end_date' => '', 'owner_membership_id' => '', 'max_related' => '', 'is_test' => 0, @@ -81,17 +82,17 @@ function membership_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MembershipPayment/Create.php b/api/v3/examples/MembershipPayment/Create.php index 1df477999a..5cf4a9ee27 100644 --- a/api/v3/examples/MembershipPayment/Create.php +++ b/api/v3/examples/MembershipPayment/Create.php @@ -62,17 +62,17 @@ function membership_payment_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipPaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MembershipPayment/Get.php b/api/v3/examples/MembershipPayment/Get.php index 86dfa26b05..fa8c03591c 100644 --- a/api/v3/examples/MembershipPayment/Get.php +++ b/api/v3/examples/MembershipPayment/Get.php @@ -62,17 +62,17 @@ function membership_payment_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipPaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MembershipStatus/Create.php b/api/v3/examples/MembershipStatus/Create.php index 614c84415c..62b129aa52 100644 --- a/api/v3/examples/MembershipStatus/Create.php +++ b/api/v3/examples/MembershipStatus/Create.php @@ -73,17 +73,17 @@ function membership_status_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipStatusTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MembershipStatus/Get.php b/api/v3/examples/MembershipStatus/Get.php index 396a9a68ca..f31da82b91 100644 --- a/api/v3/examples/MembershipStatus/Get.php +++ b/api/v3/examples/MembershipStatus/Get.php @@ -68,17 +68,17 @@ function membership_status_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipStatusTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MembershipType/Create.php b/api/v3/examples/MembershipType/Create.php index f78351a900..b3adad9070 100644 --- a/api/v3/examples/MembershipType/Create.php +++ b/api/v3/examples/MembershipType/Create.php @@ -89,17 +89,17 @@ function membership_type_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MembershipType/Delete.php b/api/v3/examples/MembershipType/Delete.php index 59200470d9..810c7b062d 100644 --- a/api/v3/examples/MembershipType/Delete.php +++ b/api/v3/examples/MembershipType/Delete.php @@ -7,7 +7,7 @@ */ function membership_type_delete_example() { $params = [ - 'id' => 4, + 'id' => 5, ]; try{ @@ -54,17 +54,17 @@ function membership_type_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MembershipType/Get.php b/api/v3/examples/MembershipType/Get.php index 232ad99518..35770ea494 100644 --- a/api/v3/examples/MembershipType/Get.php +++ b/api/v3/examples/MembershipType/Get.php @@ -49,7 +49,7 @@ function membership_type_get_expectedresult() { 'name' => 'General', 'member_of_contact_id' => '4', 'financial_type_id' => '2', - 'minimum_fee' => '0.00', + 'minimum_fee' => '0.000000000', 'duration_unit' => 'year', 'duration_interval' => '1', 'period_type' => 'rolling', @@ -71,17 +71,17 @@ function membership_type_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MessageTemplate/Create.php b/api/v3/examples/MessageTemplate/Create.php index 16a8b53f25..293e6da69f 100644 --- a/api/v3/examples/MessageTemplate/Create.php +++ b/api/v3/examples/MessageTemplate/Create.php @@ -7,11 +7,11 @@ */ function message_template_create_example() { $params = [ - 'msg_title' => 'msg_title_284', - 'msg_subject' => 'msg_subject_284', - 'msg_text' => 'msg_text_284', - 'msg_html' => 'msg_html_284', - 'workflow_id' => 284, + 'msg_title' => 'msg_title_471', + 'msg_subject' => 'msg_subject_471', + 'msg_text' => 'msg_text_471', + 'msg_html' => 'msg_html_471', + 'workflow_id' => 471, 'is_default' => '1', 'is_reserved' => 1, ]; @@ -51,12 +51,12 @@ function message_template_create_expectedresult() { 'values' => [ '69' => [ 'id' => '69', - 'msg_title' => 'msg_title_284', - 'msg_subject' => 'msg_subject_284', - 'msg_text' => 'msg_text_284', - 'msg_html' => 'msg_html_284', + 'msg_title' => 'msg_title_471', + 'msg_subject' => 'msg_subject_471', + 'msg_text' => 'msg_text_471', + 'msg_html' => 'msg_html_471', 'is_active' => '1', - 'workflow_id' => '284', + 'workflow_id' => '471', 'is_default' => '1', 'is_reserved' => '1', 'is_sms' => '', @@ -75,17 +75,17 @@ function message_template_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MessageTemplate/Delete.php b/api/v3/examples/MessageTemplate/Delete.php index 70f769ff0d..5829e0df6c 100644 --- a/api/v3/examples/MessageTemplate/Delete.php +++ b/api/v3/examples/MessageTemplate/Delete.php @@ -54,17 +54,17 @@ function message_template_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/MessageTemplate/Get.php b/api/v3/examples/MessageTemplate/Get.php index d29e2073f7..985ecbba48 100644 --- a/api/v3/examples/MessageTemplate/Get.php +++ b/api/v3/examples/MessageTemplate/Get.php @@ -7,11 +7,11 @@ */ function message_template_get_example() { $params = [ - 'msg_title' => 'msg_title_285', - 'msg_subject' => 'msg_subject_285', - 'msg_text' => 'msg_text_285', - 'msg_html' => 'msg_html_285', - 'workflow_id' => 285, + 'msg_title' => 'msg_title_472', + 'msg_subject' => 'msg_subject_472', + 'msg_text' => 'msg_text_472', + 'msg_html' => 'msg_html_472', + 'workflow_id' => 472, 'is_default' => '1', 'is_reserved' => 1, ]; @@ -51,16 +51,16 @@ function message_template_get_expectedresult() { 'values' => [ '70' => [ 'id' => '70', - 'msg_title' => 'msg_title_285', - 'msg_subject' => 'msg_subject_285', - 'msg_text' => 'msg_text_285', - 'msg_html' => 'msg_html_285', + 'msg_title' => 'msg_title_472', + 'msg_subject' => 'msg_subject_472', + 'msg_text' => 'msg_text_472', + 'msg_html' => 'msg_html_472', 'is_active' => '1', - 'workflow_id' => '285', + 'workflow_id' => '472', 'is_default' => '1', 'is_reserved' => '1', - 'is_sms' => '1', - 'pdf_format_id' => '285', + 'is_sms' => 0, + 'pdf_format_id' => '472', ], ], ]; @@ -75,17 +75,17 @@ function message_template_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Note/Create.php b/api/v3/examples/Note/Create.php index 89166d5ee3..8e3cd49991 100644 --- a/api/v3/examples/Note/Create.php +++ b/api/v3/examples/Note/Create.php @@ -8,9 +8,9 @@ function note_create_example() { $params = [ 'entity_table' => 'civicrm_contact', - 'entity_id' => 9, + 'entity_id' => 15, 'note' => 'Hello!!! m testing Note', - 'contact_id' => 9, + 'contact_id' => 15, 'modified_date' => '2011-01-31', 'subject' => 'Test Note', ]; @@ -46,14 +46,14 @@ function note_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 8, + 'id' => 14, 'values' => [ - '8' => [ - 'id' => '8', + '14' => [ + 'id' => '14', 'entity_table' => 'civicrm_contact', - 'entity_id' => '9', + 'entity_id' => '15', 'note' => 'Hello!!! m testing Note', - 'contact_id' => '9', + 'contact_id' => '15', 'modified_date' => '2012-11-14 16:02:35', 'subject' => 'Test Note', 'privacy' => 0, @@ -71,17 +71,17 @@ function note_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/NoteTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Note/Delete.php b/api/v3/examples/Note/Delete.php index 7fdca70af5..cec6389e29 100644 --- a/api/v3/examples/Note/Delete.php +++ b/api/v3/examples/Note/Delete.php @@ -7,7 +7,7 @@ */ function note_delete_example() { $params = [ - 'id' => 19, + 'id' => 32, ]; try{ @@ -54,17 +54,17 @@ function note_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/NoteTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Note/Get.php b/api/v3/examples/Note/Get.php index f045d610ab..17e84a67a2 100644 --- a/api/v3/examples/Note/Get.php +++ b/api/v3/examples/Note/Get.php @@ -8,7 +8,7 @@ function note_get_example() { $params = [ 'entity_table' => 'civicrm_contact', - 'entity_id' => 3, + 'entity_id' => 5, ]; try{ @@ -55,17 +55,17 @@ function note_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/NoteTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/OpenID/Create.php b/api/v3/examples/OpenID/Create.php index 39cfeb0161..03244878a4 100644 --- a/api/v3/examples/OpenID/Create.php +++ b/api/v3/examples/OpenID/Create.php @@ -7,9 +7,8 @@ */ function open_i_d_create_example() { $params = [ - 'contact_id' => 3, + 'contact_id' => 5, 'openid' => 'My OpenID handle', - 'location_type_id' => 1, ]; try{ @@ -43,11 +42,11 @@ function open_i_d_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 2, 'values' => [ - '1' => [ - 'id' => '1', - 'contact_id' => '3', + '2' => [ + 'id' => '2', + 'contact_id' => '5', 'location_type_id' => '1', 'openid' => 'My OpenID handle', 'allowed_to_login' => '', @@ -61,22 +60,22 @@ function open_i_d_create_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testCreateOpenID" +* The test that created it is called "testCreateOpenIDDefaultLocation" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OpenIDTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/OpenID/Delete.php b/api/v3/examples/OpenID/Delete.php index 291dbbc592..8c7318d836 100644 --- a/api/v3/examples/OpenID/Delete.php +++ b/api/v3/examples/OpenID/Delete.php @@ -7,7 +7,7 @@ */ function open_i_d_delete_example() { $params = [ - 'id' => 3, + 'id' => 4, ]; try{ @@ -54,17 +54,17 @@ function open_i_d_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OpenIDTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/OpenID/Get.php b/api/v3/examples/OpenID/Get.php index 4ebf7f556d..9a2da402ed 100644 --- a/api/v3/examples/OpenID/Get.php +++ b/api/v3/examples/OpenID/Get.php @@ -7,7 +7,7 @@ */ function open_i_d_get_example() { $params = [ - 'contact_id' => 4, + 'contact_id' => 7, 'openid' => 'My OpenID handle', 'location_type_id' => 1, ]; @@ -43,11 +43,11 @@ function open_i_d_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 3, 'values' => [ - '2' => [ - 'id' => '2', - 'contact_id' => '4', + '3' => [ + 'id' => '3', + 'contact_id' => '7', 'location_type_id' => '1', 'openid' => 'My OpenID handle', 'allowed_to_login' => 0, @@ -66,17 +66,17 @@ function open_i_d_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OpenIDTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/OptionGroup/Create.php b/api/v3/examples/OptionGroup/Create.php index b44190696a..109b81d4d2 100644 --- a/api/v3/examples/OptionGroup/Create.php +++ b/api/v3/examples/OptionGroup/Create.php @@ -51,10 +51,10 @@ function option_group_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 92, + 'id' => 96, 'values' => [ '0' => [ - 'id' => '92', + 'id' => '96', 'name' => 'civicrm_event.amount.560', 'title' => '', 'description' => '', @@ -62,7 +62,7 @@ function option_group_create_expectedresult() { 'is_reserved' => '1', 'is_active' => '1', 'is_locked' => '', - 'api.OptionValue.create' => 849, + 'api.OptionValue.create' => 869, ], ], ]; @@ -77,17 +77,17 @@ function option_group_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OptionGroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/OptionGroup/Delete.php b/api/v3/examples/OptionGroup/Delete.php index 953f4eb760..7871a5b8b2 100644 --- a/api/v3/examples/OptionGroup/Delete.php +++ b/api/v3/examples/OptionGroup/Delete.php @@ -7,7 +7,7 @@ */ function option_group_delete_example() { $params = [ - 'id' => 97, + 'id' => 101, ]; try{ @@ -54,17 +54,17 @@ function option_group_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OptionGroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/OptionGroup/Get.php b/api/v3/examples/OptionGroup/Get.php index 396906a3fc..a17a22183d 100644 --- a/api/v3/examples/OptionGroup/Get.php +++ b/api/v3/examples/OptionGroup/Get.php @@ -64,17 +64,17 @@ function option_group_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OptionGroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/OptionValue/Get.php b/api/v3/examples/OptionValue/Get.php index 9fc467248e..f7158fc069 100644 --- a/api/v3/examples/OptionValue/Get.php +++ b/api/v3/examples/OptionValue/Get.php @@ -115,17 +115,17 @@ function option_value_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OptionValueTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/OptionValue/SortOption.php b/api/v3/examples/OptionValue/SortOption.php index bc4bbcd61b..ae9e2611cc 100644 --- a/api/v3/examples/OptionValue/SortOption.php +++ b/api/v3/examples/OptionValue/SortOption.php @@ -66,17 +66,17 @@ function option_value_getsingle_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OptionValueTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Order/Cancel.php b/api/v3/examples/Order/Cancel.php index eef34ecfae..2f4327d0d9 100644 --- a/api/v3/examples/Order/Cancel.php +++ b/api/v3/examples/Order/Cancel.php @@ -56,6 +56,7 @@ function order_cancel_expectedresult() { 'net_amount' => '100.00', 'trxn_id' => '', 'invoice_id' => '', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -70,7 +71,7 @@ function order_cancel_expectedresult() { 'address_id' => '', 'check_number' => '', 'campaign_id' => '', - 'creditnote_id' => 'CN_1', + 'creditnote_id' => '1', 'tax_amount' => '', 'revenue_recognition_date' => '', 'contribution_type_id' => '1', @@ -88,17 +89,17 @@ function order_cancel_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OrderTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Order/Create.php b/api/v3/examples/Order/Create.php index 8ab83214d1..05b76b87a2 100644 --- a/api/v3/examples/Order/Create.php +++ b/api/v3/examples/Order/Create.php @@ -10,7 +10,7 @@ function order_create_example() { 'contact_id' => 8, 'receive_date' => '2010-01-20', 'total_amount' => 200, - 'financial_type_id' => 1, + 'financial_type_id' => 'Event Fee', 'contribution_status_id' => 1, 'line_items' => [ '0' => [ @@ -21,8 +21,8 @@ function order_create_example() { 'label' => 'Price Field 2', 'field_title' => 'Price Field 2', 'qty' => 1, - 'unit_price' => '200', - 'line_total' => '200', + 'unit_price' => '200.000000000', + 'line_total' => '200.000000000', 'financial_type_id' => '4', 'entity_table' => 'civicrm_membership', 'membership_type_id' => 1, @@ -78,7 +78,7 @@ function order_create_expectedresult() { '1' => [ 'id' => '1', 'contact_id' => '8', - 'financial_type_id' => '1', + 'financial_type_id' => '4', 'contribution_page_id' => '', 'payment_instrument_id' => '4', 'receive_date' => '20100120000000', @@ -88,6 +88,7 @@ function order_create_expectedresult() { 'net_amount' => '200', 'trxn_id' => '', 'invoice_id' => '', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -105,7 +106,7 @@ function order_create_expectedresult() { 'creditnote_id' => '', 'tax_amount' => '', 'revenue_recognition_date' => '', - 'contribution_type_id' => '1', + 'contribution_type_id' => '4', ], ], ]; @@ -120,17 +121,17 @@ function order_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OrderTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Order/CreateOrderParticipant.php b/api/v3/examples/Order/CreateOrderParticipant.php index 6baee2a729..9915cf6d72 100644 --- a/api/v3/examples/Order/CreateOrderParticipant.php +++ b/api/v3/examples/Order/CreateOrderParticipant.php @@ -23,8 +23,8 @@ function order_create_example() { 'label' => 'Price Field 1', 'field_title' => 'Price Field 1', 'qty' => 1, - 'unit_price' => '100', - 'line_total' => '100', + 'unit_price' => '100.000000000', + 'line_total' => '100.000000000', 'financial_type_id' => '4', 'entity_table' => 'civicrm_participant', ], @@ -34,8 +34,8 @@ function order_create_example() { 'label' => 'Price Field 2', 'field_title' => 'Price Field 2', 'qty' => 1, - 'unit_price' => '200', - 'line_total' => '200', + 'unit_price' => '200.000000000', + 'line_total' => '200.000000000', 'financial_type_id' => '4', 'entity_table' => 'civicrm_participant', ], @@ -98,6 +98,7 @@ function order_create_expectedresult() { 'net_amount' => '300', 'trxn_id' => '', 'invoice_id' => '', + 'invoice_number' => '', 'currency' => 'USD', 'cancel_date' => '', 'cancel_reason' => '', @@ -130,17 +131,17 @@ function order_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OrderTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Order/Delete.php b/api/v3/examples/Order/Delete.php index a1ba94375e..8c63b2bb6f 100644 --- a/api/v3/examples/Order/Delete.php +++ b/api/v3/examples/Order/Delete.php @@ -57,17 +57,17 @@ function order_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OrderTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Order/Get.php b/api/v3/examples/Order/Get.php index 32ef1a23b7..c5af053154 100644 --- a/api/v3/examples/Order/Get.php +++ b/api/v3/examples/Order/Get.php @@ -51,6 +51,10 @@ function order_get_expectedresult() { 'display_name' => 'Mr. Anthony Anderson II', 'contribution_id' => '1', 'currency' => 'USD', + 'contribution_recur_id' => '', + 'contribution_status_id' => '1', + 'contribution_campaign_id' => '', + 'payment_instrument_id' => '4', 'receive_date' => '2010-01-20 00:00:00', 'non_deductible_amount' => '0.00', 'total_amount' => '100.00', @@ -58,39 +62,30 @@ function order_get_expectedresult() { 'net_amount' => '100.00', 'trxn_id' => '', 'invoice_id' => '', - 'cancel_date' => '', + 'invoice_number' => '', + 'contribution_cancel_date' => '', 'cancel_reason' => '', 'receipt_date' => '', 'thankyou_date' => '', 'contribution_source' => '', 'amount_level' => '', - 'contribution_recur_id' => '', 'is_test' => 0, 'is_pay_later' => 0, - 'contribution_status_id' => '1', 'contribution_check_number' => '', - 'contribution_campaign_id' => '', - 'financial_type_id' => '1', - 'financial_type' => 'Donation', - 'product_id' => '', - 'product_name' => '', - 'sku' => '', - 'contribution_product_id' => '', - 'product_option' => '', - 'fulfilled_date' => '', - 'contribution_start_date' => '', - 'contribution_end_date' => '', 'financial_account_id' => '1', 'accounting_code' => '4200', 'campaign_id' => '', 'contribution_campaign_title' => '', + 'financial_type_id' => '1', 'contribution_note' => '', 'contribution_batch' => '', - 'contribution_status' => 'Completed', + 'contribution_recur_status' => 'Completed', 'payment_instrument' => 'Check', - 'payment_instrument_id' => '4', - 'instrument_id' => '4', + 'contribution_status' => 'Completed', + 'financial_type' => 'Donation', 'check_number' => '', + 'instrument_id' => '4', + 'cancel_date' => '', 'id' => '1', 'contribution_type_id' => '1', 'line_items' => [ @@ -124,17 +119,17 @@ function order_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OrderTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Participant/Create.php b/api/v3/examples/Participant/Create.php index a6a714208d..27dd8c000d 100644 --- a/api/v3/examples/Participant/Create.php +++ b/api/v3/examples/Participant/Create.php @@ -8,7 +8,7 @@ function participant_create_example() { $params = [ 'contact_id' => 2, - 'event_id' => 2, + 'event_id' => 3, 'status_id' => 1, 'role_id' => 1, 'register_date' => '2007-07-21 00:00:00', @@ -52,7 +52,7 @@ function participant_create_expectedresult() { '4' => [ 'id' => '4', 'contact_id' => '2', - 'event_id' => '2', + 'event_id' => '3', 'status_id' => '1', 'role_id' => '1', 'register_date' => '20070721000000', @@ -83,17 +83,17 @@ function participant_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Participant/Get.php b/api/v3/examples/Participant/Get.php index 0734b19708..d883a17061 100644 --- a/api/v3/examples/Participant/Get.php +++ b/api/v3/examples/Participant/Get.php @@ -53,6 +53,7 @@ function participant_get_expectedresult() { 'event_title' => 'Annual CiviCRM meet', 'event_start_date' => '2013-07-29 00:00:00', 'event_end_date' => '2013-08-04 00:00:00', + 'default_role_id' => '1', 'participant_id' => '1', 'participant_fee_level' => '', 'participant_fee_amount' => '', @@ -85,17 +86,17 @@ function participant_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Participant/NestedDelete.php b/api/v3/examples/Participant/NestedDelete.php index 8f098e52c3..599bf723a1 100644 --- a/api/v3/examples/Participant/NestedDelete.php +++ b/api/v3/examples/Participant/NestedDelete.php @@ -51,10 +51,11 @@ function participant_get_expectedresult() { 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', 'display_name' => 'Mr. Anthony Anderson II', - 'event_id' => '41', + 'event_id' => '42', 'event_title' => 'Annual CiviCRM meet', 'event_start_date' => '2013-07-29 00:00:00', 'event_end_date' => '2013-08-04 00:00:00', + 'default_role_id' => '1', 'participant_id' => '2', 'participant_fee_level' => '', 'participant_fee_amount' => '', @@ -86,10 +87,11 @@ function participant_get_expectedresult() { 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', 'display_name' => 'Mr. Anthony Anderson II', - 'event_id' => '41', + 'event_id' => '42', 'event_title' => 'Annual CiviCRM meet', 'event_start_date' => '2013-07-29 00:00:00', 'event_end_date' => '2013-08-04 00:00:00', + 'default_role_id' => '1', 'participant_id' => '3', 'participant_fee_level' => '', 'participant_fee_amount' => '', @@ -128,17 +130,17 @@ function participant_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Participant/NestedEventGet.php b/api/v3/examples/Participant/NestedEventGet.php index 75bd573d5e..526905947a 100644 --- a/api/v3/examples/Participant/NestedEventGet.php +++ b/api/v3/examples/Participant/NestedEventGet.php @@ -56,6 +56,7 @@ function participant_get_expectedresult() { 'event_title' => 'Annual CiviCRM meet', 'event_start_date' => '2013-07-29 00:00:00', 'event_end_date' => '2013-08-04 00:00:00', + 'default_role_id' => '1', 'participant_id' => '1', 'participant_fee_level' => '', 'participant_fee_amount' => '', @@ -104,7 +105,7 @@ function participant_get_expectedresult() { 'is_active' => '1', 'is_show_location' => 0, 'default_role_id' => '1', - 'is_email_confirm' => 0, + 'is_email_confirm' => '1', 'is_pay_later' => 0, 'is_partial_payment' => 0, 'is_multiple_registrations' => 0, @@ -134,17 +135,17 @@ function participant_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ParticipantPayment/Create.php b/api/v3/examples/ParticipantPayment/Create.php index 9374697c02..afb8dc3e84 100644 --- a/api/v3/examples/ParticipantPayment/Create.php +++ b/api/v3/examples/ParticipantPayment/Create.php @@ -62,17 +62,17 @@ function participant_payment_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantPaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ParticipantPayment/Delete.php b/api/v3/examples/ParticipantPayment/Delete.php index 4bf80353ac..fd07bbc377 100644 --- a/api/v3/examples/ParticipantPayment/Delete.php +++ b/api/v3/examples/ParticipantPayment/Delete.php @@ -7,7 +7,7 @@ */ function participant_payment_delete_example() { $params = [ - 'id' => 5, + 'id' => 6, ]; try{ @@ -54,17 +54,17 @@ function participant_payment_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantPaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ParticipantPayment/Get.php b/api/v3/examples/ParticipantPayment/Get.php index be2f52c535..c0b8e4b714 100644 --- a/api/v3/examples/ParticipantPayment/Get.php +++ b/api/v3/examples/ParticipantPayment/Get.php @@ -7,8 +7,8 @@ */ function participant_payment_get_example() { $params = [ - 'participant_id' => 64, - 'contribution_id' => 6, + 'participant_id' => 68, + 'contribution_id' => 7, ]; try{ @@ -42,12 +42,12 @@ function participant_payment_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 6, + 'id' => 7, 'values' => [ - '6' => [ - 'id' => '6', - 'participant_id' => '64', - 'contribution_id' => '6', + '7' => [ + 'id' => '7', + 'participant_id' => '68', + 'contribution_id' => '7', ], ], ]; @@ -62,17 +62,17 @@ function participant_payment_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantPaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ParticipantStatusType/Create.php b/api/v3/examples/ParticipantStatusType/Create.php index 44a13f7418..474c521007 100644 --- a/api/v3/examples/ParticipantStatusType/Create.php +++ b/api/v3/examples/ParticipantStatusType/Create.php @@ -74,17 +74,17 @@ function participant_status_type_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantStatusTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ParticipantStatusType/Delete.php b/api/v3/examples/ParticipantStatusType/Delete.php index 4c1567d175..77d001b4b5 100644 --- a/api/v3/examples/ParticipantStatusType/Delete.php +++ b/api/v3/examples/ParticipantStatusType/Delete.php @@ -54,17 +54,17 @@ function participant_status_type_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantStatusTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ParticipantStatusType/Get.php b/api/v3/examples/ParticipantStatusType/Get.php index 70bd8a9d24..40b6e21dc2 100644 --- a/api/v3/examples/ParticipantStatusType/Get.php +++ b/api/v3/examples/ParticipantStatusType/Get.php @@ -74,17 +74,17 @@ function participant_status_type_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantStatusTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Payment/Cancel.php b/api/v3/examples/Payment/Cancel.php index c923220323..3b20cb8820 100644 --- a/api/v3/examples/Payment/Cancel.php +++ b/api/v3/examples/Payment/Cancel.php @@ -45,15 +45,15 @@ function payment_cancel_expectedresult() { 'id' => 3, 'values' => [ '3' => [ - 'id' => 3, + 'id' => '3', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20170207024650', + 'trxn_date' => '20190820192757', 'total_amount' => '-150', 'fee_amount' => '0.00', - 'net_amount' => '150.00', + 'net_amount' => '-150', 'currency' => 'USD', - 'is_payment' => 1, + 'is_payment' => '1', 'trxn_id' => '', 'trxn_result_code' => '', 'status_id' => '7', @@ -72,17 +72,17 @@ function payment_cancel_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Payment/Create.php b/api/v3/examples/Payment/Create.php index 335945660b..98fc75e877 100644 --- a/api/v3/examples/Payment/Create.php +++ b/api/v3/examples/Payment/Create.php @@ -48,7 +48,7 @@ function payment_create_expectedresult() { 'id' => '3', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20170207024646', + 'trxn_date' => '20190820192755', 'total_amount' => '50', 'fee_amount' => '', 'net_amount' => '50', @@ -72,17 +72,17 @@ function payment_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Payment/CreatePaymentWithLineItems.php b/api/v3/examples/Payment/CreatePaymentWithLineItems.php index 7d2c3fdb15..a1351e8b02 100644 --- a/api/v3/examples/Payment/CreatePaymentWithLineItems.php +++ b/api/v3/examples/Payment/CreatePaymentWithLineItems.php @@ -58,7 +58,7 @@ function payment_create_expectedresult() { 'id' => '3', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20170207024648', + 'trxn_date' => '20190820192756', 'total_amount' => '50', 'fee_amount' => '', 'net_amount' => '50', @@ -82,17 +82,17 @@ function payment_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Payment/Delete.php b/api/v3/examples/Payment/Delete.php index 99c75f8b2c..dea29275c0 100644 --- a/api/v3/examples/Payment/Delete.php +++ b/api/v3/examples/Payment/Delete.php @@ -55,17 +55,17 @@ function payment_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Payment/Get.php b/api/v3/examples/Payment/Get.php index d21df61552..45b2bfc958 100644 --- a/api/v3/examples/Payment/Get.php +++ b/api/v3/examples/Payment/Get.php @@ -71,17 +71,17 @@ function payment_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Payment/UpdatePayment.php b/api/v3/examples/Payment/UpdatePayment.php index 38b15474bf..7ac7eb09c5 100644 --- a/api/v3/examples/Payment/UpdatePayment.php +++ b/api/v3/examples/Payment/UpdatePayment.php @@ -52,7 +52,7 @@ function payment_create_expectedresult() { 'id' => '5', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20170207024653', + 'trxn_date' => '20190820192758', 'total_amount' => '100', 'fee_amount' => '', 'net_amount' => '100', @@ -76,17 +76,17 @@ function payment_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PaymentProcessor/Create.php b/api/v3/examples/PaymentProcessor/Create.php index cb1794f201..d3483bdb93 100644 --- a/api/v3/examples/PaymentProcessor/Create.php +++ b/api/v3/examples/PaymentProcessor/Create.php @@ -45,15 +45,16 @@ function payment_processor_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 1, 'values' => [ - '2' => [ - 'id' => '2', + '1' => [ + 'id' => '1', 'domain_id' => '1', 'name' => 'API Test PP', + 'title' => '', 'description' => '', 'payment_processor_type_id' => '1', - 'is_active' => '', + 'is_active' => '1', 'is_default' => 0, 'is_test' => 0, 'user_name' => '', @@ -84,17 +85,17 @@ function payment_processor_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PaymentProcessor/Delete.php b/api/v3/examples/PaymentProcessor/Delete.php index 4ee4993aa1..5c3ec5bf52 100644 --- a/api/v3/examples/PaymentProcessor/Delete.php +++ b/api/v3/examples/PaymentProcessor/Delete.php @@ -7,7 +7,7 @@ */ function payment_processor_delete_example() { $params = [ - 'id' => 2, + 'id' => 3, ]; try{ @@ -54,17 +54,17 @@ function payment_processor_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PaymentProcessorType/Create.php b/api/v3/examples/PaymentProcessorType/Create.php index 80acce7330..e0baa78f23 100644 --- a/api/v3/examples/PaymentProcessorType/Create.php +++ b/api/v3/examples/PaymentProcessorType/Create.php @@ -86,17 +86,17 @@ function payment_processor_type_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PaymentProcessorType/Delete.php b/api/v3/examples/PaymentProcessorType/Delete.php index 3126ca7a3d..e8e755d263 100644 --- a/api/v3/examples/PaymentProcessorType/Delete.php +++ b/api/v3/examples/PaymentProcessorType/Delete.php @@ -54,17 +54,17 @@ function payment_processor_type_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PaymentToken/Create.php b/api/v3/examples/PaymentToken/Create.php index 5df14cd19e..18c9c5da78 100644 --- a/api/v3/examples/PaymentToken/Create.php +++ b/api/v3/examples/PaymentToken/Create.php @@ -77,17 +77,17 @@ function payment_token_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTokenTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PaymentToken/Delete.php b/api/v3/examples/PaymentToken/Delete.php index c7f368838f..84e51e4002 100644 --- a/api/v3/examples/PaymentToken/Delete.php +++ b/api/v3/examples/PaymentToken/Delete.php @@ -54,17 +54,17 @@ function payment_token_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTokenTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PaymentToken/Get.php b/api/v3/examples/PaymentToken/Get.php index 43ae1e7202..d08f098493 100644 --- a/api/v3/examples/PaymentToken/Get.php +++ b/api/v3/examples/PaymentToken/Get.php @@ -67,17 +67,17 @@ function payment_token_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTokenTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Pcp/ChainedGetDelete.php b/api/v3/examples/Pcp/ChainedGetDelete.php new file mode 100644 index 0000000000..c5634e4add --- /dev/null +++ b/api/v3/examples/Pcp/ChainedGetDelete.php @@ -0,0 +1,114 @@ + 'Pcp title', + 'api.Pcp.delete' => 1, + ]; + + try{ + $result = civicrm_api3('Pcp', 'get', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function pcp_get_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 2, + 'values' => [ + '3' => [ + 'id' => '3', + 'contact_id' => '1', + 'status_id' => 0, + 'title' => 'Pcp title', + 'page_id' => '1', + 'page_type' => 'contribute', + 'pcp_block_id' => '1', + 'is_thermometer' => 0, + 'is_honor_roll' => 0, + 'currency' => 'USD', + 'is_active' => 0, + 'is_notify' => 0, + 'api.Pcp.delete' => [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'values' => 1, + ], + ], + '5' => [ + 'id' => '5', + 'contact_id' => '1', + 'status_id' => 0, + 'title' => 'Pcp title', + 'page_id' => '1', + 'page_type' => 'contribute', + 'pcp_block_id' => '1', + 'is_thermometer' => 0, + 'is_honor_roll' => 0, + 'currency' => 'USD', + 'is_active' => 0, + 'is_notify' => 0, + 'api.Pcp.delete' => [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'values' => 1, + ], + ], + ], + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testGetPcpChainDelete" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PcpTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/Pcp/Create.php b/api/v3/examples/Pcp/Create.php index dc659cce38..85da4f8b9d 100644 --- a/api/v3/examples/Pcp/Create.php +++ b/api/v3/examples/Pcp/Create.php @@ -77,17 +77,17 @@ function pcp_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PcpTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Pcp/Delete.php b/api/v3/examples/Pcp/Delete.php new file mode 100644 index 0000000000..a623f9b68a --- /dev/null +++ b/api/v3/examples/Pcp/Delete.php @@ -0,0 +1,70 @@ + 4, + ]; + + try{ + $result = civicrm_api3('Pcp', 'delete', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function pcp_delete_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'values' => 1, + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testDeletePcp" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PcpTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/Pcp/Get.php b/api/v3/examples/Pcp/Get.php new file mode 100644 index 0000000000..d1f4a266a0 --- /dev/null +++ b/api/v3/examples/Pcp/Get.php @@ -0,0 +1,89 @@ + 'Pcp title', + 'contact_id' => 1, + 'page_id' => 1, + 'pcp_block_id' => 1, + ]; + + try{ + $result = civicrm_api3('Pcp', 'get', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function pcp_get_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 3, + 'values' => [ + '3' => [ + 'id' => '3', + 'contact_id' => '1', + 'status_id' => 0, + 'title' => 'Pcp title', + 'page_id' => '1', + 'page_type' => 'contribute', + 'pcp_block_id' => '1', + 'is_thermometer' => 0, + 'is_honor_roll' => 0, + 'currency' => 'USD', + 'is_active' => 0, + 'is_notify' => 0, + ], + ], + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testGetPcp" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PcpTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/Phone/Create.php b/api/v3/examples/Phone/Create.php index 8f2a0c2178..3fd8e7b230 100644 --- a/api/v3/examples/Phone/Create.php +++ b/api/v3/examples/Phone/Create.php @@ -7,8 +7,7 @@ */ function phone_create_example() { $params = [ - 'contact_id' => 3, - 'location_type_id' => 6, + 'contact_id' => 5, 'phone' => '(123) 456-7890', 'is_primary' => 1, 'phone_type_id' => 1, @@ -45,12 +44,12 @@ function phone_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 3, 'values' => [ - '2' => [ - 'id' => '2', - 'contact_id' => '3', - 'location_type_id' => '6', + '3' => [ + 'id' => '3', + 'contact_id' => '5', + 'location_type_id' => '1', 'is_primary' => '1', 'is_billing' => '', 'mobile_provider_id' => '', @@ -67,22 +66,22 @@ function phone_create_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testCreatePhone" +* The test that created it is called "testCreatePhoneDefaultLocation" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PhoneTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Phone/Delete.php b/api/v3/examples/Phone/Delete.php index 07bb8a2353..beff5e9e33 100644 --- a/api/v3/examples/Phone/Delete.php +++ b/api/v3/examples/Phone/Delete.php @@ -7,7 +7,7 @@ */ function phone_delete_example() { $params = [ - 'id' => 3, + 'id' => 4, ]; try{ @@ -54,17 +54,17 @@ function phone_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PhoneTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Phone/Get.php b/api/v3/examples/Phone/Get.php index 40571916fc..57d25de2dd 100644 --- a/api/v3/examples/Phone/Get.php +++ b/api/v3/examples/Phone/Get.php @@ -7,7 +7,7 @@ */ function phone_get_example() { $params = [ - 'contact_id' => 7, + 'contact_id' => 12, 'phone' => '(123) 456-7890', ]; @@ -42,12 +42,12 @@ function phone_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 4, + 'id' => 5, 'values' => [ - '4' => [ - 'id' => '4', - 'contact_id' => '7', - 'location_type_id' => '10', + '5' => [ + 'id' => '5', + 'contact_id' => '12', + 'location_type_id' => '15', 'is_primary' => '1', 'is_billing' => 0, 'phone' => '(123) 456-7890', @@ -67,17 +67,17 @@ function phone_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PhoneTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Phone/GetOptions.php b/api/v3/examples/Phone/GetOptions.php index 1b7cd959b9..3ac7d56b31 100644 --- a/api/v3/examples/Phone/GetOptions.php +++ b/api/v3/examples/Phone/GetOptions.php @@ -60,17 +60,17 @@ function phone_getoptions_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ConstantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Pledge/Create.php b/api/v3/examples/Pledge/Create.php index e524f20c89..3ffb6b2d56 100644 --- a/api/v3/examples/Pledge/Create.php +++ b/api/v3/examples/Pledge/Create.php @@ -7,10 +7,10 @@ */ function pledge_create_example() { $params = [ - 'contact_id' => 11, - 'pledge_create_date' => '20170207', - 'start_date' => '20170207', - 'scheduled_date' => '20170209', + 'contact_id' => 12, + 'pledge_create_date' => '20190820', + 'start_date' => '20190820', + 'scheduled_date' => '20190822', 'amount' => '100', 'pledge_status_id' => '2', 'pledge_financial_type_id' => '1', @@ -57,7 +57,7 @@ function pledge_create_expectedresult() { 'values' => [ '0' => [ 'id' => '1', - 'contact_id' => '11', + 'contact_id' => '12', 'financial_type_id' => '1', 'contribution_page_id' => '', 'amount' => '100', @@ -79,6 +79,7 @@ function pledge_create_expectedresult() { 'status_id' => '2', 'is_test' => '', 'campaign_id' => '', + 'contribution_type_id' => '1', ], ], ]; @@ -93,17 +94,17 @@ function pledge_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Pledge/Delete.php b/api/v3/examples/Pledge/Delete.php index 7b6e86458f..d11698ce1b 100644 --- a/api/v3/examples/Pledge/Delete.php +++ b/api/v3/examples/Pledge/Delete.php @@ -57,17 +57,17 @@ function pledge_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Pledge/Get.php b/api/v3/examples/Pledge/Get.php index 7f75449bd0..b664e2b647 100644 --- a/api/v3/examples/Pledge/Get.php +++ b/api/v3/examples/Pledge/Get.php @@ -51,11 +51,11 @@ function pledge_get_expectedresult() { 'display_name' => 'Mr. Anthony Anderson II', 'pledge_id' => '1', 'pledge_amount' => '100.00', - 'pledge_create_date' => '2017-02-07 00:00:00', - 'pledge_start_date' => '2017-02-07 00:00:00', + 'pledge_create_date' => '2019-08-20 00:00:00', + 'pledge_start_date' => '2019-08-20 00:00:00', 'pledge_status' => 'Pending', 'pledge_total_paid' => '', - 'pledge_next_pay_date' => '2017-02-09 00:00:00', + 'pledge_next_pay_date' => '2019-08-22 00:00:00', 'pledge_next_pay_amount' => '20.00', 'pledge_outstanding_amount' => '', 'pledge_financial_type' => 'Donation', @@ -80,17 +80,17 @@ function pledge_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Pledge/GetFilterHighDate.php b/api/v3/examples/Pledge/GetFilterHighDate.php index c567d852e9..d7dcb34cf9 100644 --- a/api/v3/examples/Pledge/GetFilterHighDate.php +++ b/api/v3/examples/Pledge/GetFilterHighDate.php @@ -9,7 +9,7 @@ */ function pledge_get_example() { $params = [ - 'pledge_start_date_high' => '20170205024740', + 'pledge_start_date_high' => '20190818192828', ]; try{ @@ -53,11 +53,11 @@ function pledge_get_expectedresult() { 'display_name' => 'Mr. Anthony Anderson II', 'pledge_id' => '2', 'pledge_amount' => '100.00', - 'pledge_create_date' => '2017-02-07 00:00:00', - 'pledge_start_date' => '2016-03-04 00:00:00', + 'pledge_create_date' => '2019-08-20 00:00:00', + 'pledge_start_date' => '2018-03-02 00:00:00', 'pledge_status' => 'Overdue', 'pledge_total_paid' => '', - 'pledge_next_pay_date' => '2016-03-04 00:00:00', + 'pledge_next_pay_date' => '2018-03-02 00:00:00', 'pledge_next_pay_amount' => '20.00', 'pledge_outstanding_amount' => '20.00', 'pledge_financial_type' => 'Donation', @@ -82,17 +82,17 @@ function pledge_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PledgePayment/Create.php b/api/v3/examples/PledgePayment/Create.php index 07070f6a61..b2c50bfaac 100644 --- a/api/v3/examples/PledgePayment/Create.php +++ b/api/v3/examples/PledgePayment/Create.php @@ -7,7 +7,7 @@ */ function pledge_payment_create_example() { $params = [ - 'contact_id' => 1, + 'contact_id' => 3, 'pledge_id' => 1, 'contribution_id' => 1, 'status_id' => 1, @@ -72,17 +72,17 @@ function pledge_payment_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgePaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PledgePayment/Delete.php b/api/v3/examples/PledgePayment/Delete.php index ce498be4ef..7f5f8bb244 100644 --- a/api/v3/examples/PledgePayment/Delete.php +++ b/api/v3/examples/PledgePayment/Delete.php @@ -57,17 +57,17 @@ function pledge_payment_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgePaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PledgePayment/Get.php b/api/v3/examples/PledgePayment/Get.php index 3d42d7ba84..826d83948f 100644 --- a/api/v3/examples/PledgePayment/Get.php +++ b/api/v3/examples/PledgePayment/Get.php @@ -98,17 +98,17 @@ function pledge_payment_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgePaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PledgePayment/Update.php b/api/v3/examples/PledgePayment/Update.php index b9dc6999d7..cf60c64a13 100644 --- a/api/v3/examples/PledgePayment/Update.php +++ b/api/v3/examples/PledgePayment/Update.php @@ -69,17 +69,17 @@ function pledge_payment_update_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgePaymentTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PriceField/Create.php b/api/v3/examples/PriceField/Create.php index c25152293b..05ec60e5f9 100644 --- a/api/v3/examples/PriceField/Create.php +++ b/api/v3/examples/PriceField/Create.php @@ -80,17 +80,17 @@ function price_field_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PriceField/Delete.php b/api/v3/examples/PriceField/Delete.php index 51213fe012..483b6426e4 100644 --- a/api/v3/examples/PriceField/Delete.php +++ b/api/v3/examples/PriceField/Delete.php @@ -54,17 +54,17 @@ function price_field_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PriceField/Get.php b/api/v3/examples/PriceField/Get.php index 5ea6fe86b8..0562018818 100644 --- a/api/v3/examples/PriceField/Get.php +++ b/api/v3/examples/PriceField/Get.php @@ -70,17 +70,17 @@ function price_field_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PriceFieldValue/Create.php b/api/v3/examples/PriceFieldValue/Create.php index e6332aa8a0..7eb90fc41b 100644 --- a/api/v3/examples/PriceFieldValue/Create.php +++ b/api/v3/examples/PriceFieldValue/Create.php @@ -68,6 +68,7 @@ function price_field_value_create_expectedresult() { 'is_active' => '1', 'financial_type_id' => '2', 'non_deductible_amount' => '', + 'visibility_id' => '', 'contribution_type_id' => '2', ], ], @@ -83,17 +84,17 @@ function price_field_value_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldValueTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PriceFieldValue/Delete.php b/api/v3/examples/PriceFieldValue/Delete.php index b258473c78..58af271e84 100644 --- a/api/v3/examples/PriceFieldValue/Delete.php +++ b/api/v3/examples/PriceFieldValue/Delete.php @@ -54,17 +54,17 @@ function price_field_value_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldValueTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PriceFieldValue/Get.php b/api/v3/examples/PriceFieldValue/Get.php index 6a949c384e..5889b0a7a3 100644 --- a/api/v3/examples/PriceFieldValue/Get.php +++ b/api/v3/examples/PriceFieldValue/Get.php @@ -48,12 +48,13 @@ function price_field_value_get_expectedresult() { 'price_field_id' => '1', 'name' => 'contribution_amount', 'label' => 'Contribution Amount', - 'amount' => '1', + 'amount' => '1.000000000', 'weight' => '1', 'is_default' => 0, 'is_active' => '1', 'financial_type_id' => '1', 'non_deductible_amount' => '0.00', + 'visibility_id' => '1', 'contribution_type_id' => '1', ], ], @@ -69,17 +70,17 @@ function price_field_value_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldValueTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PriceSet/Create.php b/api/v3/examples/PriceSet/Create.php index be4f7fd9bc..bb18c6768f 100644 --- a/api/v3/examples/PriceSet/Create.php +++ b/api/v3/examples/PriceSet/Create.php @@ -45,10 +45,10 @@ function price_set_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 18, + 'id' => 20, 'values' => [ - '18' => [ - 'id' => '18', + '20' => [ + 'id' => '20', 'domain_id' => '', 'name' => 'event price', 'title' => 'event price', @@ -75,17 +75,17 @@ function price_set_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceSetTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PriceSet/Delete.php b/api/v3/examples/PriceSet/Delete.php index e4f96909d3..7ad89e8168 100644 --- a/api/v3/examples/PriceSet/Delete.php +++ b/api/v3/examples/PriceSet/Delete.php @@ -7,7 +7,7 @@ */ function price_set_delete_example() { $params = [ - 'id' => 19, + 'id' => 21, ]; try{ @@ -54,17 +54,17 @@ function price_set_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceSetTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/PriceSet/Get.php b/api/v3/examples/PriceSet/Get.php index be0f4fd52e..adfb4b89c3 100644 --- a/api/v3/examples/PriceSet/Get.php +++ b/api/v3/examples/PriceSet/Get.php @@ -67,17 +67,17 @@ function price_set_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceSetTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Profile/Apply.php b/api/v3/examples/Profile/Apply.php index c3d881b4b8..54279e7b13 100644 --- a/api/v3/examples/Profile/Apply.php +++ b/api/v3/examples/Profile/Apply.php @@ -7,8 +7,8 @@ */ function profile_apply_example() { $params = [ - 'profile_id' => 31, - 'contact_id' => 3, + 'profile_id' => 30, + 'contact_id' => 5, 'first_name' => 'abc2', 'last_name' => 'xyz2', 'email-Primary' => 'abc2.xyz2@gmail.com', @@ -51,10 +51,10 @@ function profile_apply_expectedresult() { 'values' => [ 'contact_type' => 'Individual', 'contact_sub_type' => '', - 'contact_id' => 3, + 'contact_id' => 5, 'version' => 3, 'debug' => 1, - 'profile_id' => 31, + 'profile_id' => 30, 'first_name' => 'abc2', 'last_name' => 'xyz2', 'email' => [ @@ -93,17 +93,17 @@ function profile_apply_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ProfileTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Profile/Get.php b/api/v3/examples/Profile/Get.php index 0e9e07c701..a8f3e4f341 100644 --- a/api/v3/examples/Profile/Get.php +++ b/api/v3/examples/Profile/Get.php @@ -12,7 +12,7 @@ function profile_get_example() { '1' => 1, '2' => 'Billing', ], - 'contact_id' => 3, + 'contact_id' => 5, ]; try{ @@ -91,17 +91,17 @@ function profile_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ProfileTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Profile/GetFields.php b/api/v3/examples/Profile/GetFields.php index 588e90a21a..b95c81efca 100644 --- a/api/v3/examples/Profile/GetFields.php +++ b/api/v3/examples/Profile/GetFields.php @@ -10,7 +10,7 @@ function profile_getfields_example() { $params = [ 'action' => 'submit', - 'profile_id' => 27, + 'profile_id' => 22, ]; try{ @@ -46,9 +46,15 @@ function profile_getfields_expectedresult() { 'count' => 9, 'values' => [ 'custom_1' => [ + 'id' => '1', 'label' => '_addCustomFieldToProfile', - 'groupTitle' => '_addCustomFie', + 'headerPattern' => '//', + 'title' => 'first_name', + 'custom_field_id' => '1', + 'groupTitle' => '_addCustomFieldToProfile', 'data_type' => 'String', + 'name' => 'custom_1', + 'type' => 2, 'html_type' => 'Text', 'default_value' => 'defaultValue', 'text_length' => '', @@ -66,9 +72,9 @@ function profile_getfields_expectedresult() { 'is_required' => 0, 'table_name' => 'civicrm_value__addcustomfie_1', 'column_name' => '_addcustomfieldtoprofile_1', - 'name' => 'custom_1', - 'title' => 'first_name', - 'type' => 2, + 'where' => 'civicrm_value__addcustomfie_1._addcustomfieldtoprofile_1', + 'extends_table' => 'civicrm_contact', + 'search_table' => 'contact_a', 'api.required' => '1', 'help_pre' => '', 'help_post' => '', @@ -91,11 +97,13 @@ function profile_getfields_expectedresult() { 'table_name' => 'civicrm_address', 'entity' => 'address', 'bao' => 'CRM_Core_BAO_Address', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 64, 'size' => 6, ], + 'is_core_field' => TRUE, 'api.required' => 0, 'help_pre' => '', 'help_post' => '', @@ -107,9 +115,12 @@ function profile_getfields_expectedresult() { 'type' => 1, 'title' => 'State Province', 'description' => 'Which State_Province does this address belong to.', + 'where' => 'civicrm_address.state_province_id', 'table_name' => 'civicrm_address', 'entity' => 'address', 'bao' => 'CRM_Core_BAO_Address', + 'localizable' => 0, + 'localize_context' => 'province', 'FKClassName' => 'CRM_Core_DAO_StateProvince', 'html' => [ 'type' => 'ChainSelect', @@ -121,6 +132,7 @@ function profile_getfields_expectedresult() { 'keyColumn' => 'id', 'labelColumn' => 'name', ], + 'is_core_field' => TRUE, 'FKApiName' => 'StateProvince', 'api.required' => '1', 'help_pre' => '', @@ -133,9 +145,12 @@ function profile_getfields_expectedresult() { 'type' => 1, 'title' => 'Country', 'description' => 'Which Country does this address belong to.', + 'where' => 'civicrm_address.country_id', 'table_name' => 'civicrm_address', 'entity' => 'address', 'bao' => 'CRM_Core_BAO_Address', + 'localizable' => 0, + 'localize_context' => 'country', 'FKClassName' => 'CRM_Core_DAO_Country', 'html' => [ 'type' => 'Select', @@ -147,7 +162,9 @@ function profile_getfields_expectedresult() { 'keyColumn' => 'id', 'labelColumn' => 'name', 'nameColumn' => 'iso_code', + 'abbrColumn' => 'iso_code', ], + 'is_core_field' => TRUE, 'FKApiName' => 'Country', 'api.required' => '1', 'help_pre' => '', @@ -170,11 +187,13 @@ function profile_getfields_expectedresult() { 'table_name' => 'civicrm_phone', 'entity' => 'phone', 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 32, 'size' => 20, ], + 'is_core_field' => TRUE, 'api.required' => '1', 'help_pre' => '', 'help_post' => '', @@ -197,11 +216,13 @@ function profile_getfields_expectedresult() { 'table_name' => 'civicrm_email', 'entity' => 'email', 'bao' => 'CRM_Core_BAO_Email', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 254, 'size' => 30, ], + 'is_core_field' => TRUE, 'api.required' => '1', 'help_pre' => '', 'help_post' => '', @@ -225,11 +246,13 @@ function profile_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 64, 'size' => 30, ], + 'is_core_field' => TRUE, 'api.required' => '1', 'help_pre' => '', 'help_post' => '', @@ -251,11 +274,13 @@ function profile_getfields_expectedresult() { 'table_name' => 'civicrm_contact', 'entity' => 'contact', 'bao' => 'CRM_Contact_BAO_Contact', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 64, 'size' => 30, ], + 'is_core_field' => TRUE, 'api.required' => '1', 'help_pre' => '', 'help_post' => '', @@ -280,17 +305,17 @@ function profile_getfields_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ProfileTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Profile/Submit.php b/api/v3/examples/Profile/Submit.php index 35f3b2f770..3f2d700720 100644 --- a/api/v3/examples/Profile/Submit.php +++ b/api/v3/examples/Profile/Submit.php @@ -7,8 +7,8 @@ */ function profile_submit_example() { $params = [ - 'profile_id' => 29, - 'contact_id' => 3, + 'profile_id' => 24, + 'contact_id' => 5, 'first_name' => 'abc2', 'last_name' => 'xyz2', 'email-primary' => 'abc2.xyz2@gmail.com', @@ -48,10 +48,10 @@ function profile_submit_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 5, 'values' => [ - '3' => [ - 'id' => '3', + '5' => [ + 'id' => '5', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'do_not_email' => 0, @@ -78,7 +78,7 @@ function profile_submit_expectedresult() { 'prefix_id' => '3', 'suffix_id' => '3', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => 'Dear abc1', @@ -114,17 +114,17 @@ function profile_submit_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ProfileTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/RelationshipType/Create.php b/api/v3/examples/RelationshipType/Create.php index d2e71aa285..e83a875ed6 100644 --- a/api/v3/examples/RelationshipType/Create.php +++ b/api/v3/examples/RelationshipType/Create.php @@ -76,17 +76,17 @@ function relationship_type_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/RelationshipType/Delete.php b/api/v3/examples/RelationshipType/Delete.php index ec8c1aad7d..4f2afdd612 100644 --- a/api/v3/examples/RelationshipType/Delete.php +++ b/api/v3/examples/RelationshipType/Delete.php @@ -54,17 +54,17 @@ function relationship_type_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTypeTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ReportTemplate/Getrows.php b/api/v3/examples/ReportTemplate/Getrows.php index 48804cb7a5..97e0948a9d 100644 --- a/api/v3/examples/ReportTemplate/Getrows.php +++ b/api/v3/examples/ReportTemplate/Getrows.php @@ -2,14 +2,14 @@ /** * Test Generated example demonstrating the ReportTemplate.getrows API. * - * Retrieve rows from a report template (optionally providing the instance_id). + * Retrieve rows from a mailing opened report template. * * @return array * API result array */ function report_template_getrows_example() { $params = [ - 'report_id' => 'contact/summary', + 'report_id' => 'Mailing/opened', 'options' => [ 'metadata' => [ '0' => 'labels', @@ -48,25 +48,71 @@ function report_template_getrows_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 2, + 'count' => 5, 'values' => [ '0' => [ - 'civicrm_contact_sort_name' => 'Second Domain', - 'civicrm_contact_id' => '2', - 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/report/contact/detail&reset=1&force=1&id_op=eq&id_value=2', - 'civicrm_contact_sort_name_hover' => 'View Contact Detail Report for this contact', + 'civicrm_contact_id' => '102', + 'civicrm_contact_sort_name' => 'One, Test', + 'civicrm_mailing_mailing_name' => 'Second Test Mailing Events', + 'civicrm_mailing_mailing_name_alias' => 'Second Test Mailing Events', + 'civicrm_mailing_mailing_subject' => 'Hello again, {contact.display_name}', + 'civicrm_mailing_event_opened_id' => '17', + 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:23:22', + 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=102', + 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.', ], '1' => [ - 'civicrm_contact_sort_name' => 'Unit Test Organization', - 'civicrm_contact_id' => '1', - 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/report/contact/detail&reset=1&force=1&id_op=eq&id_value=1', - 'civicrm_contact_sort_name_hover' => 'View Contact Detail Report for this contact', + 'civicrm_contact_id' => '109', + 'civicrm_contact_sort_name' => 'Five, Test', + 'civicrm_mailing_mailing_name' => 'First Mailing Events', + 'civicrm_mailing_mailing_name_alias' => 'First Mailing Events', + 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}', + 'civicrm_mailing_event_opened_id' => '9', + 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:19:03', + 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=109', + 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.', + ], + '2' => [ + 'civicrm_contact_id' => '110', + 'civicrm_contact_sort_name' => 'Six, Test', + 'civicrm_mailing_mailing_name' => 'First Mailing Events', + 'civicrm_mailing_mailing_name_alias' => 'First Mailing Events', + 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}', + 'civicrm_mailing_event_opened_id' => '5', + 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:17:54', + 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=110', + 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.', + ], + '3' => [ + 'civicrm_contact_id' => '111', + 'civicrm_contact_sort_name' => 'Seven, Test', + 'civicrm_mailing_mailing_name' => 'First Mailing Events', + 'civicrm_mailing_mailing_name_alias' => 'First Mailing Events', + 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}', + 'civicrm_mailing_event_opened_id' => '15', + 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:20:59', + 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=111', + 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.', + ], + '4' => [ + 'civicrm_contact_id' => '112', + 'civicrm_contact_sort_name' => 'Eight, Test', + 'civicrm_mailing_mailing_name' => 'First Mailing Events', + 'civicrm_mailing_mailing_name_alias' => 'First Mailing Events', + 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}', + 'civicrm_mailing_event_opened_id' => '11', + 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:19:44', + 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=112', + 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.', ], ], 'metadata' => [ 'title' => 'ERROR: Title is not Set', 'labels' => [ 'civicrm_contact_sort_name' => 'Contact Name', + 'civicrm_mailing_mailing_name' => 'Mailing Name', + 'civicrm_mailing_mailing_subject' => 'Mailing Subject', + 'civicrm_mailing_event_opened_time_stamp' => 'Open Date', ], ], ]; @@ -76,22 +122,22 @@ function report_template_getrows_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testReportTemplateGetRowsContactSummary" +* The test that created it is called "testReportTemplateGetRowsMailingUniqueOpened" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ReportTemplateTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ReportTemplate/Getstatistics.php b/api/v3/examples/ReportTemplate/Getstatistics.php index cfb3de5822..40f22af22b 100644 --- a/api/v3/examples/ReportTemplate/Getstatistics.php +++ b/api/v3/examples/ReportTemplate/Getstatistics.php @@ -42,8 +42,16 @@ function report_template_getstatistics_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 0, - 'values' => '', + 'count' => 1, + 'id' => 'counts', + 'values' => [ + 'counts' => [ + 'rowCount' => [ + 'title' => 'Row(s) Listed', + 'value' => 0, + ], + ], + ], ]; return $expectedResult; @@ -56,17 +64,17 @@ function report_template_getstatistics_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ReportTemplateTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/SavedSearch/Create.php b/api/v3/examples/SavedSearch/Create.php index 149e9f6b03..4667b1f808 100644 --- a/api/v3/examples/SavedSearch/Create.php +++ b/api/v3/examples/SavedSearch/Create.php @@ -82,9 +82,9 @@ function saved_search_create_expectedresult() { 'saved_search_id' => '3', 'is_active' => '1', 'visibility' => 'User and User Admin Only', - 'where_clause' => ' ( ( `civicrm_group_contact_cache_1`.group_id IN (\"1\") ) ) ', - 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";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:31:\"`civicrm_group_contact_cache_1`\";s:132:\" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_1` ON contact_a.id = `civicrm_group_contact_cache_1`.contact_id \";}', - 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:31:\"`civicrm_group_contact_cache_1`\";s:132:\" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_1` ON contact_a.id = `civicrm_group_contact_cache_1`.contact_id \";}', + 'where_clause' => ' ( ( ( civicrm_group_contact_cache_5d5bbe284d3e9.group_id IN (\"1\") ) ) ) ', + 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";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:41:\"civicrm_group_contact_cache_5d5bbe284d3e9\";s:152:\" LEFT JOIN civicrm_group_contact_cache civicrm_group_contact_cache_5d5bbe284d3e9 ON contact_a.id = civicrm_group_contact_cache_5d5bbe284d3e9.contact_id \";}', + 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:41:\"civicrm_group_contact_cache_5d5bbe284d3e9\";s:152:\" LEFT JOIN civicrm_group_contact_cache civicrm_group_contact_cache_5d5bbe284d3e9 ON contact_a.id = civicrm_group_contact_cache_5d5bbe284d3e9.contact_id \";}', 'group_type' => '', 'cache_date' => '', 'refresh_date' => '', @@ -111,17 +111,17 @@ function saved_search_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SavedSearchTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/SavedSearch/Delete.php b/api/v3/examples/SavedSearch/Delete.php index e2ed2a0ad2..00bbed7150 100644 --- a/api/v3/examples/SavedSearch/Delete.php +++ b/api/v3/examples/SavedSearch/Delete.php @@ -54,17 +54,17 @@ function saved_search_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SavedSearchTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/SavedSearch/Get.php b/api/v3/examples/SavedSearch/Get.php index cb8f5c3f3e..302240797a 100644 --- a/api/v3/examples/SavedSearch/Get.php +++ b/api/v3/examples/SavedSearch/Get.php @@ -63,17 +63,17 @@ function saved_search_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SavedSearchTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/Create.php b/api/v3/examples/Setting/Create.php index 88a1afc59d..fc2b6b9bf2 100644 --- a/api/v3/examples/Setting/Create.php +++ b/api/v3/examples/Setting/Create.php @@ -60,17 +60,17 @@ function setting_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/CreateAllDomains.php b/api/v3/examples/Setting/CreateAllDomains.php index 7cfef55b75..d25e161045 100644 --- a/api/v3/examples/Setting/CreateAllDomains.php +++ b/api/v3/examples/Setting/CreateAllDomains.php @@ -67,17 +67,17 @@ function setting_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/CreateSettingCurrentDomain.php b/api/v3/examples/Setting/CreateSettingCurrentDomain.php index d600ec4c80..038295ee25 100644 --- a/api/v3/examples/Setting/CreateSettingCurrentDomain.php +++ b/api/v3/examples/Setting/CreateSettingCurrentDomain.php @@ -61,17 +61,17 @@ function setting_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/CreateSpecifiedDomains.php b/api/v3/examples/Setting/CreateSpecifiedDomains.php index c7167e9131..d344556e71 100644 --- a/api/v3/examples/Setting/CreateSpecifiedDomains.php +++ b/api/v3/examples/Setting/CreateSpecifiedDomains.php @@ -67,17 +67,17 @@ function setting_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/Get.php b/api/v3/examples/Setting/Get.php index 74d9c9a03b..d25be60d68 100644 --- a/api/v3/examples/Setting/Get.php +++ b/api/v3/examples/Setting/Get.php @@ -60,17 +60,17 @@ function setting_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/GetAllDomains.php b/api/v3/examples/Setting/GetAllDomains.php index 185f51b869..7a0f6b26f1 100644 --- a/api/v3/examples/Setting/GetAllDomains.php +++ b/api/v3/examples/Setting/GetAllDomains.php @@ -67,17 +67,17 @@ function setting_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/GetDefaults.php b/api/v3/examples/Setting/GetDefaults.php index 6b50ddf069..cda1629a63 100644 --- a/api/v3/examples/Setting/GetDefaults.php +++ b/api/v3/examples/Setting/GetDefaults.php @@ -67,17 +67,17 @@ function setting_getdefaults_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/GetFields.php b/api/v3/examples/Setting/GetFields.php index e41b514ec5..c188d7d591 100644 --- a/api/v3/examples/Setting/GetFields.php +++ b/api/v3/examples/Setting/GetFields.php @@ -40,17 +40,20 @@ function setting_getfields_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 157, + 'count' => 173, 'values' => [ 'address_standardization_provider' => [ 'group_name' => 'Address Preferences', 'group' => 'address', 'name' => 'address_standardization_provider', 'type' => 'String', - 'html_type' => 'Select', + 'html_type' => 'select', 'default' => '', 'add' => '4.1', 'title' => 'Address Standardization Provider.', + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_SelectValues::addressProvider', + ], 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -61,10 +64,10 @@ function setting_getfields_expectedresult() { 'group' => 'address', 'name' => 'address_standardization_userid', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => '', 'add' => '4.1', - 'title' => 'Web service user ID', + 'title' => 'Provider service user ID', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -75,10 +78,10 @@ function setting_getfields_expectedresult() { 'group' => 'address', 'name' => 'address_standardization_url', 'type' => 'Text', - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => '', 'add' => '4.1', - 'title' => 'Web Service URL', + 'title' => 'Provider Service URL', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -104,28 +107,38 @@ function setting_getfields_expectedresult() { 'group' => 'campaign', 'name' => 'tag_unconfirmed', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => 'Unconfirmed', 'add' => '4.1', 'title' => 'Tag for Unconfirmed Petition Signers', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', - 'help_text' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.', + 'description' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.', + 'help_text' => '', + 'settings_pages' => [ + 'campaign' => [ + 'weight' => 10, + ], + ], ], 'petition_contacts' => [ 'group_name' => 'Campaign Preferences', 'group' => 'campaign', 'name' => 'petition_contacts', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => 'Petition Contacts', 'add' => '4.1', 'title' => 'Petition Signers Group', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', - 'help_text' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.', + 'description' => 'All contacts that have signed a CiviCampaign petition will be added to this group. The group will be created if it does not exist (it is required for email verification).', + 'help_text' => '', + 'settings_pages' => [ + 'campaign' => [ + 'weight' => 20, + ], + ], ], 'civicaseRedactActivityEmail' => [ 'group_name' => 'CiviCRM Preferences', @@ -184,11 +197,27 @@ function setting_getfields_expectedresult() { 'description' => 'How to sort activity-types on the \"Manage Case\" screen? (Set \"Default\" to load setting from the legacy \"Settings.xml\" file.)', 'help_text' => '', ], + 'civicaseActivityRevisions' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'civicaseActivityRevisions', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => '', + 'html_type' => 'radio', + 'add' => '4.7', + 'title' => 'Enable Embedded Activity Revisions', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Enable tracking of activity revisions embedded within the \"civicrm_activity\" table. Alternatively, see \"Administer => System Settings => Misc => Logging\".', + 'help_text' => '', + ], 'cvv_backoffice_required' => [ 'group_name' => 'Contribute Preferences', 'group' => 'contribute', 'name' => 'cvv_backoffice_required', 'type' => 'Boolean', + 'html_type' => 'radio', 'quick_form_type' => 'YesNo', 'default' => '1', 'add' => '4.1', @@ -223,7 +252,7 @@ function setting_getfields_expectedresult() { 'group_name' => 'Contribute Preferences', 'group' => 'contribute', 'name' => 'invoicing', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'quick_form_type' => 'Element', 'default' => 0, @@ -231,14 +260,15 @@ function setting_getfields_expectedresult() { 'title' => 'Enable Tax and Invoicing', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', - 'help_text' => '', + 'on_change' => [ + '0' => 'CRM_Invoicing_Utils::onToggle', + ], ], 'acl_financial_type' => [ 'group_name' => 'Contribute Preferences', 'group' => 'contribute', 'name' => 'acl_financial_type', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'quick_form_type' => 'Element', 'default' => 0, @@ -248,12 +278,15 @@ function setting_getfields_expectedresult() { 'is_contact' => 0, 'description' => '', 'help_text' => '', + 'help' => [ + 'id' => 'acl_financial_type', + ], ], 'deferred_revenue_enabled' => [ 'group_name' => 'Contribute Preferences', 'group' => 'contribute', 'name' => 'deferred_revenue_enabled', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'quick_form_type' => 'Element', 'default' => 0, @@ -269,10 +302,10 @@ function setting_getfields_expectedresult() { 'group' => 'contribute', 'name' => 'default_invoice_page', 'type' => 'Integer', - 'quick_form_type' => 'Element', + 'quick_form_type' => 'Select', 'default' => '', 'pseudoconstant' => [ - 'name' => 'contributionPage', + 'callback' => 'CRM_Contribute_PseudoConstant::contributionPage', ], 'html_type' => 'select', 'add' => '4.7', @@ -286,7 +319,7 @@ function setting_getfields_expectedresult() { 'group_name' => 'Contribute Preferences', 'group' => 'contribute', 'name' => 'always_post_to_accounts_receivable', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'quick_form_type' => 'Element', 'default' => 0, @@ -301,7 +334,7 @@ function setting_getfields_expectedresult() { 'group_name' => 'Contribute Preferences', 'group' => 'contribute', 'name' => 'update_contribution_on_membership_type_change', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'quick_form_type' => 'Element', 'default' => 0, @@ -326,8 +359,9 @@ function setting_getfields_expectedresult() { 'title' => 'Viewing Contacts', 'is_domain' => '1', 'is_contact' => 0, - 'description' => '', + 'description' => 'Select the tabs that should be displayed when viewing a contact record. EXAMPLE: If your organization does not keep track of \'Relationships\', then un-check this option to simplify the screen display. Tabs for Contributions, Pledges, Memberships, Events, Grants and Cases are also hidden if the corresponding component is not enabled. Go to Administer > System Settings > Enable Components to modify the components which are available for your site.', 'help_text' => '', + 'serialize' => 1, ], 'contact_edit_options' => [ 'group_name' => 'CiviCRM Preferences', @@ -343,11 +377,13 @@ function setting_getfields_expectedresult() { 'title' => 'Editing Contacts', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'description' => 'Select the sections that should be included when adding or editing a contact record. EXAMPLE: If your organization does not record Gender and Birth Date for individuals, then simplify the form by un-checking this option. Drag interface allows you to change the order of the panes displayed on contact add/edit screen.', 'help_text' => '', + 'serialize' => 1, ], 'advanced_search_options' => [ 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', 'name' => 'advanced_search_options', 'type' => 'String', 'html_type' => 'checkboxes', @@ -359,8 +395,8 @@ function setting_getfields_expectedresult() { 'title' => 'Contact Search', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', - 'help_text' => '', + 'description' => 'Select the sections that should be included in the Basic and Advanced Search forms. EXAMPLE: If you don\'t track Relationships - then you do not need this section included in the advanced search form. Simplify the form by un-checking this option.', + 'serialize' => 1, ], 'user_dashboard_options' => [ 'group_name' => 'CiviCRM Preferences', @@ -376,32 +412,34 @@ function setting_getfields_expectedresult() { 'title' => 'Contact Dashboard', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'description' => 'Select the sections that should be included in the Contact Dashboard. EXAMPLE: If you don\'t want constituents to view their own contribution history, un-check that option.', 'help_text' => '', + 'serialize' => 1, ], 'address_options' => [ 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'address_options', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'checkboxes', 'pseudoconstant' => [ 'optionGroupName' => 'address_options', ], 'default' => '123456891011', 'add' => '4.1', - 'title' => 'Addressing Options', + 'title' => 'Address Fields', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', 'help_text' => '', + 'serialize' => 1, ], 'address_format' => [ 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'address_format', 'type' => 'String', - 'html_type' => 'TextArea', + 'html_type' => 'textarea', 'default' => '{contact.address_name} {contact.street_address} {contact.supplemental_address_1} @@ -410,7 +448,7 @@ function setting_getfields_expectedresult() { {contact.city}{, }{contact.state_province}{ }{contact.postal_code} {contact.country}', 'add' => '4.1', - 'title' => 'Address Format', + 'title' => 'Address Display Format', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -421,7 +459,7 @@ function setting_getfields_expectedresult() { 'group' => 'core', 'name' => 'mailing_format', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'textarea', 'default' => '{contact.addressee} {contact.street_address} {contact.supplemental_address_1} @@ -430,7 +468,7 @@ function setting_getfields_expectedresult() { {contact.city}{, }{contact.state_province}{ }{contact.postal_code} {contact.country}', 'add' => '4.1', - 'title' => 'Mailing Format', + 'title' => 'Mailing Label Format', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -441,28 +479,26 @@ function setting_getfields_expectedresult() { 'group' => 'core', 'name' => 'display_name_format', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'textarea', 'default' => '{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}', 'add' => '4.1', - 'title' => 'Display Name Format', + 'title' => 'Individual Display Name Format', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', - 'help_text' => '', + 'description' => 'Display name format for individual contact display names.', ], 'sort_name_format' => [ 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'sort_name_format', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'textarea', 'default' => '{contact.last_name}{, }{contact.first_name}', 'add' => '4.1', - 'title' => 'Sort Name Format', + 'title' => 'Individual Sort Name Format', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', - 'help_text' => '', + 'description' => 'Sort name format for individual contact display names.', ], 'remote_profile_submissions' => [ 'group_name' => 'CiviCRM Preferences', @@ -485,13 +521,13 @@ function setting_getfields_expectedresult() { 'name' => 'allow_alert_autodismissal', 'type' => 'Boolean', 'quick_form_type' => 'YesNo', - 'default' => '1', + 'default' => TRUE, 'html_type' => 'radio', 'add' => '4.7', 'title' => 'Allow alerts to auto-dismiss?', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'If disabled, alert messages in CiviCRM will never be automatically dismissed after 10 seconds.', + 'description' => 'If disabled, CiviCRM will not automatically dismiss any alerts after 10 seconds.', 'help_text' => '', ], 'editor_id' => [ @@ -499,10 +535,14 @@ function setting_getfields_expectedresult() { 'group' => 'core', 'name' => 'editor_id', 'type' => 'String', - 'html_type' => 'Select', + 'html_type' => 'select', 'default' => 'CKEditor', 'add' => '4.1', 'title' => 'Wysiwig Editor', + 'pseudoconstant' => [ + 'optionGroupName' => 'wysiwyg_editor', + 'keyColumn' => 'name', + ], 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -513,24 +553,29 @@ function setting_getfields_expectedresult() { 'group' => 'core', 'name' => 'contact_ajax_check_similar', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'radio', 'default' => '1', 'add' => '4.1', - 'title' => 'Ajax Check Similar', + 'title' => 'Check for Similar Contacts', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', 'help_text' => '', + 'options' => [ + '1' => 'While Typing', + '0' => 'When Saving', + '2' => 'Never', + ], ], 'ajaxPopupsEnabled' => [ 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'ajaxPopupsEnabled', 'type' => 'Boolean', - 'quick_form_type' => 'YesNo', + 'html_type' => 'checkbox', 'default' => 1, 'add' => '4.5', - 'title' => 'Ajax Popups Enabled', + 'title' => 'Enable Popup Forms', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -540,8 +585,8 @@ function setting_getfields_expectedresult() { 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'activity_assignee_notification', - 'type' => 'String', - 'html_type' => 'Text', + 'type' => 'Boolean', + 'html_type' => 'checkbox', 'default' => '1', 'add' => '4.1', 'title' => 'Notify Activity Assignees', @@ -554,8 +599,8 @@ function setting_getfields_expectedresult() { 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'activity_assignee_notification_ics', - 'type' => 'String', - 'html_type' => 'Text', + 'type' => 'Boolean', + 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.3', 'title' => 'Include ICal Invite to Activity Assignees', @@ -569,7 +614,7 @@ function setting_getfields_expectedresult() { 'group' => 'core', 'name' => 'contact_autocomplete_options', 'type' => 'String', - 'quick_form_type' => 'CheckBox', + 'html_type' => 'checkboxes', 'pseudoconstant' => [ 'callback' => 'CRM_Admin_Form_Setting_Search::getContactAutocompleteOptions', ], @@ -580,13 +625,15 @@ function setting_getfields_expectedresult() { 'is_contact' => 0, 'description' => 'Selected fields will be displayed in back-office autocomplete dropdown search results (Quick Search, etc.). Contact Name is always included.', 'help_text' => '', + 'serialize' => 1, + 'validate_callback' => 'CRM_Admin_Form_Setting_Search::enableOptionOne', ], 'contact_reference_options' => [ 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'contact_reference_options', 'type' => 'String', - 'quick_form_type' => 'CheckBox', + 'html_type' => 'checkboxes', 'pseudoconstant' => [ 'callback' => 'CRM_Admin_Form_Setting_Search::getContactReferenceOptions', ], @@ -597,6 +644,8 @@ function setting_getfields_expectedresult() { 'is_contact' => 0, 'description' => 'Selected fields will be displayed in autocomplete dropdown search results for \'Contact Reference\' custom fields. Contact Name is always included. NOTE: You must assign \'access contact reference fields\' permission to the anonymous role if you want to use custom contact reference fields in profiles on public pages. For most situations, you should use the \'Limit List to Group\' setting when configuring a contact reference field which will be used in public forms to prevent exposing your entire contact list.', 'help_text' => '', + 'serialize' => 1, + 'validate_callback' => 'CRM_Admin_Form_Setting_Search::enableOptionOne', ], 'contact_smart_group_display' => [ 'group_name' => 'CiviCRM Preferences', @@ -609,8 +658,11 @@ function setting_getfields_expectedresult() { 'title' => 'Viewing Smart Groups', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'description' => 'Controls display of the smart groups that a contact is part of in each contact\'s \"Groups\" tab. \"Show on Demand\" provides the best performance, and is recommended for most sites.', 'help_text' => '', + 'pseudoconstant' => [ + 'optionGroupName' => 'contact_smart_group_display', + ], ], 'smart_group_cache_refresh_mode' => [ 'group_name' => 'CiviCRM Preferences', @@ -661,7 +713,7 @@ function setting_getfields_expectedresult() { 'title' => 'Maximum Attachments', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Maximum number of files (documents, images, etc.) which can attached to emails or activities.', + 'description' => 'Maximum number of files (documents, images, etc.) which can be attached to emails or activities.', 'help_text' => '', ], 'maxFileSize' => [ @@ -680,7 +732,7 @@ function setting_getfields_expectedresult() { 'title' => 'Maximum File Size (in MB)', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Maximum Size of file (documents, images, etc.) which can attached to emails or activities.
Note: php.ini should support this file size.', + 'description' => 'Maximum Size of file (documents, images, etc.) which can be attached to emails or activities.
Note: php.ini should support this file size.', 'help_text' => '', ], 'contact_undelete' => [ @@ -770,7 +822,7 @@ function setting_getfields_expectedresult() { 'size' => 64, 'maxlength' => 256, ], - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => '', 'add' => '4.3', 'title' => 'Path to wkhtmltopdf executable', @@ -789,7 +841,7 @@ function setting_getfields_expectedresult() { 'size' => 64, 'maxlength' => 64, ], - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => '', 'add' => '4.3', 'title' => 'Recaptcha Options', @@ -808,7 +860,7 @@ function setting_getfields_expectedresult() { 'size' => 64, 'maxlength' => 64, ], - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => '', 'add' => '4.3', 'title' => 'Recaptcha Site Key', @@ -817,6 +869,21 @@ function setting_getfields_expectedresult() { 'description' => '', 'help_text' => '', ], + 'forceRecaptcha' => [ + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'forceRecaptcha', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'html_type' => '', + 'default' => 0, + 'title' => 'Force reCAPTCHA on Contribution pages', + 'description' => 'If enabled, reCAPTCHA will show on all contribution pages.', + ], 'recaptchaPrivateKey' => [ 'group_name' => 'CiviCRM Preferences', 'group' => 'core', @@ -827,7 +894,7 @@ function setting_getfields_expectedresult() { 'size' => 64, 'maxlength' => 64, ], - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => '', 'add' => '4.3', 'title' => 'Recaptcha Secret Key', @@ -846,7 +913,7 @@ function setting_getfields_expectedresult() { 'size' => 2, 'maxlength' => 8, ], - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => 7, 'add' => '4.3', 'title' => 'Checksum Lifespan', @@ -865,7 +932,7 @@ function setting_getfields_expectedresult() { 'size' => 64, 'maxlength' => 128, ], - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => '*default*', 'add' => '4.3', 'title' => 'Blog Feed URL', @@ -884,7 +951,7 @@ function setting_getfields_expectedresult() { 'size' => 64, 'maxlength' => 128, ], - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => '*default*', 'add' => '4.3', 'title' => 'Community Messages URL', @@ -903,7 +970,7 @@ function setting_getfields_expectedresult() { 'size' => 64, 'maxlength' => 128, ], - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => '*default*', 'add' => '4.3', 'title' => 'Getting Started URL', @@ -990,13 +1057,7 @@ function setting_getfields_expectedresult() { 'group' => 'core', 'name' => 'enable_components', 'type' => 'Array', - 'quick_form_type' => 'Element', - 'html_type' => 'advmultiselect', - 'html_attributes' => [ - 'size' => 5, - 'style' => 'width:150px', - 'class' => 'advmultiselect', - ], + 'html_type' => 'checkboxes', 'default' => '', 'add' => '4.4', 'title' => 'Enable Components', @@ -1009,6 +1070,9 @@ function setting_getfields_expectedresult() { '1' => 'CRM_Core_Component::flushEnabledComponents', '2' => 'call://resources/resetCacheCode', ], + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_SelectValues::getComponentSelectValues', + ], ], 'disable_core_css' => [ 'group_name' => 'CiviCRM Preferences', @@ -1117,7 +1181,7 @@ function setting_getfields_expectedresult() { 'size' => '32', 'maxlength' => '64', ], - 'default' => '', + 'default' => 'users', 'title' => 'CMS Users Table Name', 'description' => '', ], @@ -1231,29 +1295,160 @@ function setting_getfields_expectedresult() { 'group' => 'core', 'name' => 'syncCMSEmail', 'type' => 'Boolean', + 'html_type' => 'YesNo', 'quick_form_type' => 'YesNo', 'default' => 1, 'add' => '4.7', 'title' => 'Sync CMS Email', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'If enabled, then CMS email id will be syncronised with CiviCRM contacts\'s primary email.', + 'description' => 'If enabled, then CMS email id will be synchronised with CiviCRM contacts\'s primary email.', 'help_text' => '', ], 'preserve_activity_tab_filter' => [ 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'preserve_activity_tab_filter', - 'type' => 'String', - 'html_type' => 'Text', + 'type' => 'Boolean', + 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.7', 'title' => 'Preserve activity filters as a user preference', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'When enabled, any filter settings a user selects on the contact\'s Activity tab will be remembered as they visit other contacts', + 'description' => 'When enabled, any filter settings a user selects on the contact\'s Activity tab will be remembered as they visit other contacts.', + ], + 'do_not_notify_assignees_for' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'do_not_notify_assignees_for', + 'type' => 'Array', + 'add' => '4.7', + 'is_domain' => 1, + 'is_contact' => 0, + 'default' => [], + 'title' => 'Do not notify assignees for', + 'description' => 'These activity types will be excluded from automated email notifications to assignees.', + 'html_type' => 'select', + 'html_attributes' => [ + 'multiple' => 1, + 'class' => 'huge crm-select2', + ], + 'pseudoconstant' => [ + 'optionGroupName' => 'activity_type', + ], + 'quick_form_type' => 'Select', + ], + 'menubar_position' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'menubar_position', + 'type' => 'String', + 'html_type' => 'select', + 'default' => 'over-cms-menu', + 'add' => '5.12', + 'title' => 'Menubar position', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Location of the CiviCRM main menu.', + 'help_text' => '', + 'options' => [ + 'over-cms-menu' => 'Replace website menu', + 'below-cms-menu' => 'Below website menu', + 'above-crm-container' => 'Above content area', + 'none' => 'None - disable menu', + ], + ], + 'menubar_color' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'menubar_color', + 'type' => 'String', + 'html_type' => 'color', + 'default' => '#1b1b1b', + 'add' => '5.13', + 'title' => 'Menubar color', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Color of the CiviCRM main menu.', + 'help_text' => '', + 'validate_callback' => 'CRM_Utils_Color::normalize', + ], + 'requestableMimeTypes' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'requestableMimeTypes', + 'type' => 'String', + 'html_type' => 'Text', + 'default' => 'image/jpeg,image/pjpeg,image/gif,image/x-png,image/png,image/jpg,text/html,application/pdf', + 'add' => '5.13', + 'title' => 'Mime Types that can be passed as URL params', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Acceptable Mime Types that can be used as part of file urls', + 'help_text' => '', + ], + 'theme_frontend' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'theme_frontend', + 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => [ + 'class' => 'crm-select2', + ], + 'pseudoconstant' => [ + 'callback' => 'call://themes/getAvailable', + ], + 'default' => 'default', + 'add' => '5.16', + 'title' => 'Frontend Theme', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Theme to use on frontend pages', 'help_text' => '', ], + 'theme_backend' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'theme_backend', + 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => [ + 'class' => 'crm-select2', + ], + 'pseudoconstant' => [ + 'callback' => 'call://themes/getAvailable', + ], + 'default' => 'default', + 'add' => '5.16', + 'title' => 'Backend Theme', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Theme to use on backend pages', + 'help_text' => '', + ], + 'http_timeout' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'http_timeout', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => [ + 'size' => 2, + 'maxlength' => 3, + ], + 'default' => 5, + 'add' => '5.14', + 'title' => 'HTTP request timeout', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'How long should HTTP requests through Guzzle application run for in seconds', + 'help_text' => 'Set the number of seconds http requests should run for before terminating', + ], 'assetCache' => [ 'group_name' => 'Developer Preferences', 'group' => 'developer', @@ -1315,6 +1510,26 @@ function setting_getfields_expectedresult() { 'is_contact' => 0, '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', ], + 'environment' => [ + 'group_name' => 'Developer Preferences', + 'group' => 'developer', + 'name' => 'environment', + 'type' => 'String', + 'html_type' => 'Select', + 'quick_form_type' => 'Select', + 'default' => 'Production', + 'pseudoconstant' => [ + 'optionGroupName' => 'environment', + ], + 'add' => '4.7', + 'title' => 'Environment', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Setting to define the environment in which this CiviCRM instance is running.', + 'on_change' => [ + '0' => 'CRM_Core_BAO_Setting::onChangeEnvironmentSetting', + ], + ], 'fatalErrorHandler' => [ 'group_name' => 'Developer Preferences', 'group' => 'developer', @@ -1335,7 +1550,7 @@ function setting_getfields_expectedresult() { 'group' => 'directory', 'name' => 'uploadDir', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', @@ -1351,7 +1566,7 @@ function setting_getfields_expectedresult() { 'group' => 'directory', 'name' => 'imageUploadDir', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', @@ -1367,7 +1582,7 @@ function setting_getfields_expectedresult() { 'group' => 'directory', 'name' => 'customFileUploadDir', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', @@ -1383,7 +1598,7 @@ function setting_getfields_expectedresult() { 'group' => 'directory', 'name' => 'customTemplateDir', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', @@ -1399,7 +1614,7 @@ function setting_getfields_expectedresult() { 'group' => 'directory', 'name' => 'customPHPPathDir', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', @@ -1415,7 +1630,7 @@ function setting_getfields_expectedresult() { 'group' => 'directory', 'name' => 'extensionsDir', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', @@ -1428,23 +1643,37 @@ function setting_getfields_expectedresult() { 'enable_cart' => [ 'name' => 'enable_cart', 'group_name' => 'Event Preferences', + 'settings_pages' => [ + 'event' => [ + 'weight' => 10, + ], + ], 'group' => 'event', 'type' => 'Boolean', - 'quick_form_type' => 'Element', + 'quick_form_type' => 'CheckBox', 'default' => 0, 'add' => '4.1', - 'title' => 'Enable Event Cart', + 'title' => 'Use Shopping Cart Style Event Registration', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'WRITE ME', - 'help_text' => 'WRITE ME', + 'description' => 'This feature allows users to register for more than one event at a time. When enabled, users will add event(s) to a \"cart\" and then pay for them all at once. Enabling this setting will affect online registration for all active events. The code is an alpha state, and you will potentially need to have developer resources to debug and fix sections of the codebase while testing and deploying it', + 'help_text' => '', + 'documentation_link' => [ + 'page' => 'CiviEvent Cart Checkout', + 'resource' => 'wiki', + ], ], 'show_events' => [ 'name' => 'show_events', 'group_name' => 'Event Preferences', 'group' => 'event', + 'settings_pages' => [ + 'event' => [ + 'weight' => 20, + ], + ], 'type' => 'Integer', - 'quick_form_type' => 'Element', + 'quick_form_type' => 'Select', 'default' => 10, 'add' => '4.5', 'title' => 'Dashboard entries', @@ -1453,6 +1682,9 @@ function setting_getfields_expectedresult() { 'is_contact' => 0, 'description' => 'Configure how many events should be shown on the dashboard. This overrides the default value of 10 entries.', 'help_text' => '', + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_SelectValues::getDashboardEntriesCount', + ], ], 'ext_repo_url' => [ 'group_name' => 'Extension Preferences', @@ -1464,7 +1696,7 @@ function setting_getfields_expectedresult() { 'size' => 64, 'maxlength' => 128, ], - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => 'https://civicrm.org/extdir/ver={ver}|cms={uf}', 'add' => '4.3', 'title' => 'Extension Repo URL', @@ -1590,11 +1822,11 @@ function setting_getfields_expectedresult() { 'quick_form_type' => 'Select', 'html_type' => 'Select', 'html_attributes' => [], - 'default' => '1228', 'add' => '4.4', 'title' => 'Default Country', 'is_domain' => 1, 'is_contact' => 0, + 'is_required' => '', 'description' => 'This value is selected by default when adding a new contact address.', 'help_text' => '', 'pseudoconstant' => [ @@ -1874,6 +2106,28 @@ function setting_getfields_expectedresult() { 'callback' => 'CRM_Core_I18n::languages', ], ], + 'uiLanguages' => [ + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'uiLanguages', + 'type' => 'Array', + 'quick_form_type' => 'Select', + 'html_type' => 'select', + 'html_attributes' => [ + 'multiple' => 1, + 'class' => 'crm-select2', + ], + 'default' => '', + 'add' => '5.9', + 'title' => 'Available Languages', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => 'User Interface languages available to users', + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_I18n::languages', + ], + ], 'lcMessages' => [ 'group_name' => 'Localization Preferences', 'group' => 'localization', @@ -1981,7 +2235,7 @@ function setting_getfields_expectedresult() { 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'profile_double_optin', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'default' => '1', 'add' => '4.1', @@ -1995,7 +2249,7 @@ function setting_getfields_expectedresult() { 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'track_civimail_replies', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.1', @@ -2010,25 +2264,25 @@ function setting_getfields_expectedresult() { 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'civimail_workflow', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.1', - 'title' => 'Use CiviMail Workflow', + 'title' => 'Enable workflow support for CiviMail', 'is_domain' => 1, 'is_contact' => 0, - '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.', + 'description' => 'Drupal-only. Rules module must be enabled (beta feature - use with caution).', 'help_text' => '', ], 'civimail_server_wide_lock' => [ 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'civimail_server_wide_lock', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.1', - 'title' => 'Lock Mails Server-Wide for Mail Sending', + 'title' => 'Enable global server wide lock for CiviMail', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -2068,21 +2322,21 @@ function setting_getfields_expectedresult() { 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'profile_add_to_group_double_optin', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.1', - 'title' => 'Enable Double Opt-in for Profile Group(s) field', + 'title' => 'Enable Double Opt-in for Profiles which use the \"Add to Group\" setting', 'is_domain' => 1, 'is_contact' => 0, - '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.', + 'description' => 'When CiviMail is enabled and a profile uses the \"Add to Group\" setting, users who complete the profile form will receive a confirmation email. They must respond (opt-in) before they are added to the group.', 'help_text' => '', ], 'disable_mandatory_tokens_check' => [ 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'disable_mandatory_tokens_check', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.4', @@ -2096,7 +2350,7 @@ function setting_getfields_expectedresult() { 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'dedupe_email_default', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'default' => 1, 'add' => '4.5', @@ -2110,7 +2364,7 @@ function setting_getfields_expectedresult() { 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'hash_mailing_url', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.5', @@ -2124,21 +2378,21 @@ function setting_getfields_expectedresult() { 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'civimail_multiple_bulk_emails', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.5', - 'title' => ' Multiple Bulk Emails', + 'title' => 'Enable multiple bulk email address for a contact.', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'If enabled, CiviMail will deliver a copy of the email to each bulk email listed for the contact.', + 'description' => 'CiviMail will deliver a copy of the email to each bulk email listed for the contact. Enabling this setting will also change the options for the \"Email on Hold\" field in Advanced Search.', 'help_text' => '', ], 'include_message_id' => [ 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'include_message_id', - 'type' => 'Integer', + 'type' => 'Boolean', 'html_type' => 'checkbox', 'default' => '', 'add' => '4.5', @@ -2248,7 +2502,8 @@ function setting_getfields_expectedresult() { 'group' => 'mailing', 'name' => 'write_activity_record', 'type' => 'Boolean', - 'quick_form_type' => 'YesNo', + 'html_type' => 'checkbox', + 'quick_form_type' => 'CheckBox', 'default' => '1', 'add' => '4.7', 'title' => 'Enable CiviMail to create activities on delivery', @@ -2275,6 +2530,33 @@ function setting_getfields_expectedresult() { 'description' => 'The number of emails sendable via simple mail. Make sure you understand the implications for your spam reputation and legal requirements for bulk emails before editing. As there is some risk both to your spam reputation and the products if this is misused it is a hidden setting', 'help_text' => 'CiviCRM forces users sending more than this number of mails to use CiviMails. CiviMails have additional precautions: not sending to contacts who do not want bulk mail, adding domain name and opt out links. You should familiarise yourself with the law relevant to you on bulk mailings if changing this setting. For the US https://en.wikipedia.org/wiki/CAN-SPAM_Act_of_2003 is a good place to start.', ], + 'auto_recipient_rebuild' => [ + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'auto_recipient_rebuild', + 'type' => 'Boolean', + 'html_type' => 'checkbox', + 'quick_form_type' => 'CheckBox', + 'default' => '1', + 'title' => 'Enable automatic CiviMail recipient count display', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Enable this setting to rebuild recipient list automatically during composing mail. Disable will allow you to rebuild recipient manually.', + 'help_text' => 'CiviMail automatically fetches recipient list and count whenever mailing groups are included or excluded while composing bulk mail. This phenomena may degrade performance for large sites, so disable this setting to build and fetch recipients for selected groups, manually.', + ], + 'allow_mail_from_logged_in_contact' => [ + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'allow_mail_from_logged_in_contact', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 1, + 'title' => 'Allow mail from logged in contact', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Allow sending email from the logged in contact\'s email address', + 'help_text' => 'CiviCRM allows you to send email from the domain from email addresses and the logged in contact id addresses by default. Disable this if you only want to allow the domain from addresses to be used.', + ], 'geoAPIKey' => [ 'add' => '4.7', 'help_text' => '', @@ -2360,10 +2642,10 @@ function setting_getfields_expectedresult() { 'group' => 'member', 'name' => 'default_renewal_contribution_page', 'type' => 'Integer', - 'html_type' => 'Select', + 'html_type' => 'select', 'default' => '', 'pseudoconstant' => [ - 'name' => 'contributionPage', + 'callback' => 'CRM_Contribute_PseudoConstant::contributionPage', ], 'add' => '4.1', 'title' => 'Default online membership renewal page', @@ -2376,14 +2658,24 @@ function setting_getfields_expectedresult() { 'group_name' => 'Multi Site Preferences', 'group' => 'multisite', 'name' => 'is_enabled', - 'title' => 'Multisite Is enabled', - 'type' => 'Integer', + 'title' => 'Enable Multi Site Configuration', + 'html_type' => 'checkbox', + 'type' => 'Boolean', 'default' => 0, 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Multisite is enabled', + 'description' => 'Make CiviCRM aware of multiple domains. You should configure a domain group if enabled', + 'documentation_link' => [ + 'page' => 'Multi Site Installation', + 'resource' => 'wiki', + ], 'help_text' => '', + 'settings_pages' => [ + 'multisite' => [ + 'weight' => 10, + ], + ], ], 'domain_group_id' => [ 'group_name' => 'Multi Site Preferences', @@ -2391,12 +2683,24 @@ function setting_getfields_expectedresult() { 'name' => 'domain_group_id', 'title' => 'Multisite Domain Group', 'type' => 'Integer', + 'html_type' => 'entity_reference', + 'entity_reference_options' => [ + 'entity' => 'Group', + 'select' => [ + 'minimumInputLength' => 0, + ], + ], 'default' => 0, 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'description' => 'Contacts created on this site are added to this group', 'help_text' => '', + 'settings_pages' => [ + 'multisite' => [ + 'weight' => 20, + ], + ], ], 'event_price_set_domain_id' => [ 'group_name' => 'Multi Site Preferences', @@ -2430,11 +2734,7 @@ function setting_getfields_expectedresult() { 'name' => 'search_autocomplete_count', 'type' => 'Integer', 'quick_form_type' => 'Element', - 'html_type' => 'text', - 'html_attributes' => [ - 'size' => 2, - 'maxlength' => 2, - ], + 'html_type' => 'number', 'default' => 10, 'add' => '4.3', 'title' => 'Autocomplete Results', @@ -2473,7 +2773,7 @@ function setting_getfields_expectedresult() { 'size' => 64, 'maxlength' => 64, ], - 'html_type' => 'Text', + 'html_type' => 'text', 'default' => 'simple', 'add' => '4.5', 'title' => 'How to handle full-tet queries', @@ -2558,7 +2858,7 @@ function setting_getfields_expectedresult() { 'name' => 'smartGroupCacheTimeout', 'type' => 'Integer', 'quick_form_type' => 'Element', - 'html_type' => 'text', + 'html_type' => 'number', 'default' => 5, 'add' => '4.6', 'title' => 'Smart group cache timeout', @@ -2588,6 +2888,25 @@ function setting_getfields_expectedresult() { 'description' => 'If set, this will be the default profile used for contact search.', 'help_text' => '', ], + 'prevNextBackend' => [ + 'group_name' => 'Search Preferences', + 'group' => 'Search Preferences', + 'name' => 'prevNextBackend', + 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => [], + 'default' => 'default', + 'add' => '5.9', + 'title' => 'PrevNext Cache', + 'is_domain' => 1, + 'is_contact' => 0, + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_BAO_PrevNextCache::getPrevNextBackends', + ], + 'description' => 'When performing a search, how should the search-results be cached?', + 'help_text' => '', + ], 'searchPrimaryDetailsOnly' => [ 'group_name' => 'Search Preferences', 'group' => 'Search Preferences', @@ -2602,6 +2921,37 @@ function setting_getfields_expectedresult() { 'description' => 'If enabled, only primary details (eg contact\'s primary email, phone, etc) will be included in Basic and Advanced Search results. Disabling this feature will allow users to match contacts using any email, phone etc detail.', 'help_text' => '', ], + 'quicksearch_options' => [ + 'group_name' => 'Search Preferences', + 'group' => 'Search Preferences', + 'name' => 'quicksearch_options', + 'type' => 'string', + 'serialize' => 1, + 'html_type' => 'checkboxes', + 'sortable' => TRUE, + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_SelectValues::quicksearchOptions', + ], + 'default' => [ + '0' => 'sort_name', + '1' => 'contact_id', + '2' => 'external_identifier', + '3' => 'first_name', + '4' => 'last_name', + '5' => 'email', + '6' => 'phone_numeric', + '7' => 'street_address', + '8' => 'city', + '9' => 'postal_code', + '10' => 'job_title', + ], + 'add' => '5.8', + 'title' => 'Quicksearch options', + 'is_domain' => '1', + 'is_contact' => 0, + 'description' => 'Which fields can be searched on in the menubar quicksearch box? Don\'t see your custom field here? Make sure it is marked as Searchable.', + 'help_text' => '', + ], 'userFrameworkResourceURL' => [ 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group' => 'url', @@ -2609,7 +2959,7 @@ function setting_getfields_expectedresult() { 'name' => 'userFrameworkResourceURL', 'title' => 'CiviCRM Resource URL', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', @@ -2626,7 +2976,7 @@ function setting_getfields_expectedresult() { 'title' => 'Image Upload URL', 'name' => 'imageUploadURL', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', @@ -2643,7 +2993,7 @@ function setting_getfields_expectedresult() { 'name' => 'customCSSURL', 'title' => 'Custom CSS URL', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', @@ -2660,7 +3010,7 @@ function setting_getfields_expectedresult() { 'title' => 'Extension Resource URL', 'name' => 'extensionsURL', 'type' => 'String', - 'html_type' => 'Text', + 'html_type' => 'text', 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', @@ -2683,17 +3033,17 @@ function setting_getfields_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/GetSettingCurrentDomain.php b/api/v3/examples/Setting/GetSettingCurrentDomain.php index de514afdc2..bc808c71ef 100644 --- a/api/v3/examples/Setting/GetSettingCurrentDomain.php +++ b/api/v3/examples/Setting/GetSettingCurrentDomain.php @@ -61,17 +61,17 @@ function setting_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/GetSpecifiedDomains.php b/api/v3/examples/Setting/GetSpecifiedDomains.php index 9de1adaef0..1257cc53de 100644 --- a/api/v3/examples/Setting/GetSpecifiedDomains.php +++ b/api/v3/examples/Setting/GetSpecifiedDomains.php @@ -69,17 +69,17 @@ function setting_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/GetValue.php b/api/v3/examples/Setting/GetValue.php index a5534bcac9..ef75b6a9e9 100644 --- a/api/v3/examples/Setting/GetValue.php +++ b/api/v3/examples/Setting/GetValue.php @@ -52,17 +52,17 @@ function setting_getvalue_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Setting/Revert.php b/api/v3/examples/Setting/Revert.php index de5aa88ffa..7535db2a82 100644 --- a/api/v3/examples/Setting/Revert.php +++ b/api/v3/examples/Setting/Revert.php @@ -73,17 +73,17 @@ function setting_revert_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/StateProvince/Create.php b/api/v3/examples/StateProvince/Create.php index f84cd70bf2..d2a3e6c487 100644 --- a/api/v3/examples/StateProvince/Create.php +++ b/api/v3/examples/StateProvince/Create.php @@ -43,10 +43,10 @@ function state_province_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 13947, + 'id' => 14033, 'values' => [ - '13947' => [ - 'id' => '13947', + '14033' => [ + 'id' => '14033', 'name' => 'Wessex', 'abbreviation' => 'WEX', 'country_id' => '1226', @@ -64,17 +64,17 @@ function state_province_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StateProvinceTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/StateProvince/Delete.php b/api/v3/examples/StateProvince/Delete.php index 38863c43c8..9628de2efb 100644 --- a/api/v3/examples/StateProvince/Delete.php +++ b/api/v3/examples/StateProvince/Delete.php @@ -7,7 +7,7 @@ */ function state_province_delete_example() { $params = [ - 'id' => 13948, + 'id' => 14034, ]; try{ @@ -54,17 +54,17 @@ function state_province_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StateProvinceTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/StateProvince/Get.php b/api/v3/examples/StateProvince/Get.php index 7cdf17e9ca..3d3508aadc 100644 --- a/api/v3/examples/StateProvince/Get.php +++ b/api/v3/examples/StateProvince/Get.php @@ -41,10 +41,10 @@ function state_province_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 13949, + 'id' => 14035, 'values' => [ - '13949' => [ - 'id' => '13949', + '14035' => [ + 'id' => '14035', 'name' => 'Wessex', 'abbreviation' => 'WEX', 'country_id' => '1226', @@ -62,17 +62,17 @@ function state_province_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StateProvinceTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/StatusPreference/Create.php b/api/v3/examples/StatusPreference/Create.php index d217d25a15..a18cc05451 100644 --- a/api/v3/examples/StatusPreference/Create.php +++ b/api/v3/examples/StatusPreference/Create.php @@ -69,17 +69,17 @@ function status_preference_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StatusPreferenceTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/StatusPreference/Delete.php b/api/v3/examples/StatusPreference/Delete.php index 14afaefcda..3a7916de06 100644 --- a/api/v3/examples/StatusPreference/Delete.php +++ b/api/v3/examples/StatusPreference/Delete.php @@ -54,17 +54,17 @@ function status_preference_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StatusPreferenceTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/StatusPreference/Get.php b/api/v3/examples/StatusPreference/Get.php index 8393a062f2..63c7503263 100644 --- a/api/v3/examples/StatusPreference/Get.php +++ b/api/v3/examples/StatusPreference/Get.php @@ -63,17 +63,17 @@ function status_preference_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StatusPreferenceTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Survey/ChainedGetDelete.php b/api/v3/examples/Survey/ChainedGetDelete.php index 222a49d251..a0b99eaede 100644 --- a/api/v3/examples/Survey/ChainedGetDelete.php +++ b/api/v3/examples/Survey/ChainedGetDelete.php @@ -77,17 +77,17 @@ function survey_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Survey/Create.php b/api/v3/examples/Survey/Create.php index e4a4b55394..98ef5d3247 100644 --- a/api/v3/examples/Survey/Create.php +++ b/api/v3/examples/Survey/Create.php @@ -81,17 +81,17 @@ function survey_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Survey/Delete.php b/api/v3/examples/Survey/Delete.php index acc86f7fa6..af49e79597 100644 --- a/api/v3/examples/Survey/Delete.php +++ b/api/v3/examples/Survey/Delete.php @@ -54,17 +54,17 @@ function survey_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Survey/Get.php b/api/v3/examples/Survey/Get.php index ca7cbdd56c..a175e1473f 100644 --- a/api/v3/examples/Survey/Get.php +++ b/api/v3/examples/Survey/Get.php @@ -71,17 +71,17 @@ function survey_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/SurveyRespondant/Get.php b/api/v3/examples/SurveyRespondant/Get.php index 5fc87be96a..e54521f3aa 100644 --- a/api/v3/examples/SurveyRespondant/Get.php +++ b/api/v3/examples/SurveyRespondant/Get.php @@ -59,17 +59,17 @@ function survey_respondant_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyRespondantTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/System/Flush.php b/api/v3/examples/System/Flush.php index e702ee259b..34b2ce28f4 100644 --- a/api/v3/examples/System/Flush.php +++ b/api/v3/examples/System/Flush.php @@ -54,17 +54,17 @@ function system_flush_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SystemTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Tag/Create.php b/api/v3/examples/Tag/Create.php index fbdc03fb9e..3905455770 100644 --- a/api/v3/examples/Tag/Create.php +++ b/api/v3/examples/Tag/Create.php @@ -42,16 +42,16 @@ function tag_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 12, + 'id' => 17, 'values' => [ - '12' => [ - 'id' => '12', + '17' => [ + 'id' => '17', 'name' => 'Super Heros', 'description' => 'Outside undie-wearers', 'parent_id' => '', - 'is_selectable' => '', - 'is_reserved' => '', - 'is_tagset' => '', + 'is_selectable' => '1', + 'is_reserved' => 0, + 'is_tagset' => 0, 'used_for' => 'civicrm_contact', 'created_id' => '', 'color' => '', @@ -70,17 +70,17 @@ function tag_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Tag/Delete.php b/api/v3/examples/Tag/Delete.php index cd6dd09b6a..2f8867db1f 100644 --- a/api/v3/examples/Tag/Delete.php +++ b/api/v3/examples/Tag/Delete.php @@ -7,7 +7,7 @@ */ function tag_delete_example() { $params = [ - 'id' => '17', + 'id' => '24', ]; try{ @@ -54,17 +54,17 @@ function tag_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Tag/Get.php b/api/v3/examples/Tag/Get.php index 4c4ac2faf0..c3d91f9dc2 100644 --- a/api/v3/examples/Tag/Get.php +++ b/api/v3/examples/Tag/Get.php @@ -7,7 +7,7 @@ */ function tag_get_example() { $params = [ - 'id' => '7', + 'id' => '8', 'name' => 'New Tag3', ]; @@ -42,10 +42,10 @@ function tag_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 7, + 'id' => 8, 'values' => [ - '7' => [ - 'id' => '7', + '8' => [ + 'id' => '8', 'name' => 'New Tag3', 'description' => 'This is description for Our New Tag ', 'is_selectable' => '1', @@ -67,17 +67,17 @@ function tag_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Tag/GetFields.php b/api/v3/examples/Tag/GetFields.php index 8636fb926d..acf9b173f7 100644 --- a/api/v3/examples/Tag/GetFields.php +++ b/api/v3/examples/Tag/GetFields.php @@ -50,9 +50,12 @@ function tag_getfields_expectedresult() { 'title' => 'Tag ID', 'description' => 'Tag ID', 'required' => TRUE, + 'where' => 'civicrm_tag.id', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, + 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'tag', ], @@ -65,9 +68,12 @@ function tag_getfields_expectedresult() { 'required' => TRUE, 'maxlength' => 64, 'size' => 30, + 'where' => 'civicrm_tag.name', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, + 'is_core_field' => TRUE, 'api.required' => 1, ], 'description' => [ @@ -77,20 +83,26 @@ function tag_getfields_expectedresult() { 'description' => 'Optional verbose description of the tag.', 'maxlength' => 255, 'size' => 45, + 'where' => 'civicrm_tag.description', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'parent_id' => [ 'name' => 'parent_id', 'type' => 1, 'title' => 'Parent Tag', 'description' => 'Optional parent id for this tag.', + 'where' => 'civicrm_tag.parent_id', 'default' => 'NULL', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, 'FKClassName' => 'CRM_Core_DAO_Tag', + 'is_core_field' => TRUE, 'FKApiName' => 'Tag', ], 'is_selectable' => [ @@ -98,26 +110,35 @@ function tag_getfields_expectedresult() { 'type' => 16, 'title' => 'Display Tag?', 'description' => 'Is this tag selectable / displayed', + 'where' => 'civicrm_tag.is_selectable', 'default' => '1', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'is_reserved' => [ 'name' => 'is_reserved', 'type' => 16, 'title' => 'Reserved', + 'where' => 'civicrm_tag.is_reserved', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'is_tagset' => [ 'name' => 'is_tagset', 'type' => 16, 'title' => 'Tagset', + 'where' => 'civicrm_tag.is_tagset', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'used_for' => [ 'name' => 'used_for', @@ -125,10 +146,13 @@ function tag_getfields_expectedresult() { 'title' => 'Used For', 'maxlength' => 64, 'size' => 30, + 'where' => 'civicrm_tag.used_for', 'default' => 'NULL', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, + 'serialize' => 5, 'html' => [ 'type' => 'Select', 'maxlength' => 64, @@ -138,6 +162,7 @@ function tag_getfields_expectedresult() { 'optionGroupName' => 'tag_used_for', 'optionEditPath' => 'civicrm/admin/options/tag_used_for', ], + 'is_core_field' => TRUE, 'api.default' => 'civicrm_contact', ], 'created_id' => [ @@ -145,10 +170,13 @@ function tag_getfields_expectedresult() { 'type' => 1, 'title' => 'Tag Created By', 'description' => 'FK to civicrm_contact, who created this tag', + 'where' => 'civicrm_tag.created_id', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'is_core_field' => TRUE, 'FKApiName' => 'Contact', ], 'color' => [ @@ -158,19 +186,25 @@ function tag_getfields_expectedresult() { 'description' => 'Hex color value e.g. #ffffff', 'maxlength' => 255, 'size' => 45, + 'where' => 'civicrm_tag.color', 'default' => 'NULL', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, + 'is_core_field' => TRUE, ], 'created_date' => [ 'name' => 'created_date', 'type' => 12, 'title' => 'Tag Created Date', 'description' => 'Date and time that tag was created.', + 'where' => 'civicrm_tag.created_date', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', + 'localizable' => 0, + 'is_core_field' => TRUE, ], ], ]; @@ -185,17 +219,17 @@ function tag_getfields_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Tag/GetList.php b/api/v3/examples/Tag/GetList.php index 6c5b4b0394..a1fc219534 100644 --- a/api/v3/examples/Tag/GetList.php +++ b/api/v3/examples/Tag/GetList.php @@ -49,7 +49,7 @@ function tag_getlist_expectedresult() { 'id' => 0, 'values' => [ '0' => [ - 'id' => '19', + 'id' => '27', 'label' => 'New Tag3', 'description' => [ '0' => 'This is description for Our New Tag ', @@ -73,17 +73,17 @@ function tag_getlist_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Tag/GetReturnArray.php b/api/v3/examples/Tag/GetReturnArray.php index b4c541ce66..88bb104708 100644 --- a/api/v3/examples/Tag/GetReturnArray.php +++ b/api/v3/examples/Tag/GetReturnArray.php @@ -9,7 +9,7 @@ */ function tag_get_example() { $params = [ - 'id' => '8', + 'id' => '10', 'name' => 'New Tag3', 'return' => [ '0' => 'name', @@ -47,10 +47,10 @@ function tag_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 8, + 'id' => 10, 'values' => [ - '8' => [ - 'id' => '8', + '10' => [ + 'id' => '10', 'name' => 'New Tag3', ], ], @@ -66,17 +66,17 @@ function tag_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/UFField/Create.php b/api/v3/examples/UFField/Create.php index 7dfa389705..a4eb8f0eed 100644 --- a/api/v3/examples/UFField/Create.php +++ b/api/v3/examples/UFField/Create.php @@ -86,17 +86,17 @@ function uf_field_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/UFField/Delete.php b/api/v3/examples/UFField/Delete.php index c84edce6b0..b25806af75 100644 --- a/api/v3/examples/UFField/Delete.php +++ b/api/v3/examples/UFField/Delete.php @@ -54,17 +54,17 @@ function uf_field_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/UFField/Get.php b/api/v3/examples/UFField/Get.php index 91bfa7db7c..fc537cc71d 100644 --- a/api/v3/examples/UFField/Get.php +++ b/api/v3/examples/UFField/Get.php @@ -71,17 +71,17 @@ function uf_field_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/UFField/Replace.php b/api/v3/examples/UFField/Replace.php index dd32472a61..f0230b225e 100644 --- a/api/v3/examples/UFField/Replace.php +++ b/api/v3/examples/UFField/Replace.php @@ -152,17 +152,17 @@ function uf_field_replace_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/UFGroup/Create.php b/api/v3/examples/UFGroup/Create.php index b514ca44c4..f4096f2ac1 100644 --- a/api/v3/examples/UFGroup/Create.php +++ b/api/v3/examples/UFGroup/Create.php @@ -67,6 +67,7 @@ function uf_group_create_expectedresult() { 'is_active' => 0, 'group_type' => 'Individual,Contact', 'title' => 'Test Group', + 'frontend_title' => '', 'description' => '', 'help_pre' => 'help pre', 'help_post' => 'help post', @@ -86,6 +87,9 @@ function uf_group_create_expectedresult() { 'created_id' => '1', 'created_date' => '2013-07-28 08:49:19', 'is_proximity_search' => '', + 'cancel_button_text' => '', + 'submit_button_text' => '', + 'add_cancel_button' => '', ], ], ]; @@ -100,17 +104,17 @@ function uf_group_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFGroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/UFGroup/Delete.php b/api/v3/examples/UFGroup/Delete.php index 58ee2e9cdb..b5560002db 100644 --- a/api/v3/examples/UFGroup/Delete.php +++ b/api/v3/examples/UFGroup/Delete.php @@ -54,17 +54,17 @@ function uf_group_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFGroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/UFGroup/Get.php b/api/v3/examples/UFGroup/Get.php index 2843f27ca2..e7abf95562 100644 --- a/api/v3/examples/UFGroup/Get.php +++ b/api/v3/examples/UFGroup/Get.php @@ -66,6 +66,7 @@ function uf_group_get_expectedresult() { 'created_id' => '1', 'created_date' => '2013-07-28 08:49:19', 'is_proximity_search' => 0, + 'add_cancel_button' => '1', ], ], ]; @@ -80,17 +81,17 @@ function uf_group_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFGroupTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/UFJoin/Create.php b/api/v3/examples/UFJoin/Create.php index 386b09b76c..4b388f10ac 100644 --- a/api/v3/examples/UFJoin/Create.php +++ b/api/v3/examples/UFJoin/Create.php @@ -72,17 +72,17 @@ function uf_join_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFJoinTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/UFJoin/Get.php b/api/v3/examples/UFJoin/Get.php index 129626b354..88246c4694 100644 --- a/api/v3/examples/UFJoin/Get.php +++ b/api/v3/examples/UFJoin/Get.php @@ -67,17 +67,17 @@ function uf_join_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFJoinTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/UFMatch/Get.php b/api/v3/examples/UFMatch/Get.php index 1c77731cb6..9f68b0c692 100644 --- a/api/v3/examples/UFMatch/Get.php +++ b/api/v3/examples/UFMatch/Get.php @@ -62,17 +62,17 @@ function uf_match_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFMatchTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/User/Get.php b/api/v3/examples/User/Get.php new file mode 100644 index 0000000000..9c71f5b1b8 --- /dev/null +++ b/api/v3/examples/User/Get.php @@ -0,0 +1,78 @@ + 3, + 'sequential' => 1, + ]; + + try{ + $result = civicrm_api3('User', 'get', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function user_get_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 6, + 'values' => [ + '0' => [ + 'id' => '6', + 'name' => 'superman', + 'contact_id' => '3', + ], + ], + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testUserGet" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UserTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/User/GetFields.php b/api/v3/examples/User/GetFields.php new file mode 100644 index 0000000000..d390e46af1 --- /dev/null +++ b/api/v3/examples/User/GetFields.php @@ -0,0 +1,87 @@ + 'get', + ]; + + try{ + $result = civicrm_api3('User', 'getfields', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function user_getfields_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 3, + 'values' => [ + 'contact_id' => [ + 'title' => 'Contact ID', + 'type' => 1, + 'api.required' => 1, + 'name' => 'contact_id', + ], + 'id' => [ + 'title' => 'CMS User ID', + 'type' => 1, + 'name' => 'id', + ], + 'name' => [ + 'title' => 'Username', + 'type' => 2, + 'name' => 'name', + ], + ], + ]; + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testGetFields" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UserTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ +* +* To Learn about the API read +* https://docs.civicrm.org/dev/en/latest/api/ +* +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. +* +* Read more about testing here +* https://docs.civicrm.org/dev/en/latest/testing/ +* +* API Standards documentation: +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ +*/ diff --git a/api/v3/examples/Website/Create.php b/api/v3/examples/Website/Create.php index ca680c7339..66874a2227 100644 --- a/api/v3/examples/Website/Create.php +++ b/api/v3/examples/Website/Create.php @@ -64,17 +64,17 @@ function website_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/WebsiteTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Website/Delete.php b/api/v3/examples/Website/Delete.php index 2b99ad2c6b..4a0d85693b 100644 --- a/api/v3/examples/Website/Delete.php +++ b/api/v3/examples/Website/Delete.php @@ -54,17 +54,17 @@ function website_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/WebsiteTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Website/Get.php b/api/v3/examples/Website/Get.php index c4a8ee27ab..4c2470c789 100644 --- a/api/v3/examples/Website/Get.php +++ b/api/v3/examples/Website/Get.php @@ -7,7 +7,7 @@ */ function website_get_example() { $params = [ - 'contact_id' => 4, + 'contact_id' => 5, 'url' => 'website.com', 'website_type_id' => 1, ]; @@ -47,7 +47,7 @@ function website_get_expectedresult() { 'values' => [ '2' => [ 'id' => '2', - 'contact_id' => '4', + 'contact_id' => '5', 'url' => 'website.com', 'website_type_id' => '1', ], @@ -64,17 +64,17 @@ function website_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/WebsiteTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Website/GetFields.php b/api/v3/examples/Website/GetFields.php index 32abee5b59..a4a5f78056 100644 --- a/api/v3/examples/Website/GetFields.php +++ b/api/v3/examples/Website/GetFields.php @@ -48,9 +48,12 @@ function website_getfields_expectedresult() { 'title' => 'Website ID', 'description' => 'Unique Website ID', 'required' => TRUE, + 'where' => 'civicrm_website.id', 'table_name' => 'civicrm_website', 'entity' => 'Website', 'bao' => 'CRM_Core_BAO_Website', + 'localizable' => 0, + 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'website_id', ], @@ -60,10 +63,13 @@ function website_getfields_expectedresult() { 'type' => 1, 'title' => 'Contact', 'description' => 'FK to Contact ID', + 'where' => 'civicrm_website.contact_id', 'table_name' => 'civicrm_website', 'entity' => 'Website', 'bao' => 'CRM_Core_BAO_Website', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'is_core_field' => TRUE, 'FKApiName' => 'Contact', ], 'url' => [ @@ -81,20 +87,24 @@ function website_getfields_expectedresult() { 'table_name' => 'civicrm_website', 'entity' => 'Website', 'bao' => 'CRM_Core_BAO_Website', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 128, 'size' => 30, ], + 'is_core_field' => TRUE, ], 'website_type_id' => [ 'name' => 'website_type_id', 'type' => 1, 'title' => 'Website Type', 'description' => 'Which Website type does this website belong to.', + 'where' => 'civicrm_website.website_type_id', 'table_name' => 'civicrm_website', 'entity' => 'Website', 'bao' => 'CRM_Core_BAO_Website', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'size' => 6, @@ -104,6 +114,7 @@ function website_getfields_expectedresult() { 'optionGroupName' => 'website_type', 'optionEditPath' => 'civicrm/admin/options/website_type', ], + 'is_core_field' => TRUE, ], ], ]; @@ -118,17 +129,17 @@ function website_getfields_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/WebsiteTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Website/GetWithMetadata.php b/api/v3/examples/Website/GetWithMetadata.php index b77fac5a8b..2cf480b8f2 100644 --- a/api/v3/examples/Website/GetWithMetadata.php +++ b/api/v3/examples/Website/GetWithMetadata.php @@ -56,9 +56,12 @@ function website_get_expectedresult() { 'title' => 'Website ID', 'description' => 'Unique Website ID', 'required' => '1', + 'where' => 'civicrm_website.id', 'table_name' => 'civicrm_website', 'entity' => 'Website', 'bao' => 'CRM_Core_BAO_Website', + 'localizable' => 0, + 'is_core_field' => '1', 'api.aliases' => [ '0' => 'website_id', ], @@ -68,10 +71,13 @@ function website_get_expectedresult() { 'type' => '1', 'title' => 'Contact', 'description' => 'FK to Contact ID', + 'where' => 'civicrm_website.contact_id', 'table_name' => 'civicrm_website', 'entity' => 'Website', 'bao' => 'CRM_Core_BAO_Website', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'is_core_field' => '1', 'FKApiName' => 'Contact', ], 'url' => [ @@ -89,20 +95,24 @@ function website_get_expectedresult() { 'table_name' => 'civicrm_website', 'entity' => 'Website', 'bao' => 'CRM_Core_BAO_Website', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => '128', 'size' => '30', ], + 'is_core_field' => '1', ], 'website_type_id' => [ 'name' => 'website_type_id', 'type' => '1', 'title' => 'Website Type', 'description' => 'Which Website type does this website belong to.', + 'where' => 'civicrm_website.website_type_id', 'table_name' => 'civicrm_website', 'entity' => 'Website', 'bao' => 'CRM_Core_BAO_Website', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'size' => '6', @@ -112,6 +122,7 @@ function website_get_expectedresult() { 'optionGroupName' => 'website_type', 'optionEditPath' => 'civicrm/admin/options/website_type', ], + 'is_core_field' => '1', ], ], ], @@ -127,17 +138,17 @@ function website_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/WebsiteTest.php * * You can see the outcome of the API tests at -* https://test.civicrm.org/job/CiviCRM-master-git/ +* https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read -* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* https://docs.civicrm.org/dev/en/latest/api/ * -* Browse the api on your own site with the api explorer -* http://MYSITE.ORG/path/to/civicrm/api +* Browse the API on your own site with the API Explorer. It is in the main +* CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here -* http://wiki.civicrm.org/confluence/display/CRM/Testing +* https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: -* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/tests/templates/documentFunction.tpl b/tests/templates/documentFunction.tpl index 15af3c351d..199226399f 100644 --- a/tests/templates/documentFunction.tpl +++ b/tests/templates/documentFunction.tpl @@ -29,12 +29,12 @@ function {$function}_example() {literal}{{/literal} $errorMessage = $e->getMessage(); $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); - return array( + return [ 'is_error' => 1, 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, - ); + ]; }{/literal} return $result;