415ba5cde918ec9a56babfdca4099a1042f96599
3 * Test Generated example demonstrating the Profile.get API.
8 function profile_get_example() {
10 'profile_id' => array(
19 $result = civicrm_api3('Profile', 'get', $params);
21 catch (CiviCRM_API3_Exception
$e) {
23 $errorMessage = $e->getMessage();
24 $errorCode = $e->getErrorCode();
25 $errorData = $e->getExtraParams();
27 'error' => $errorMessage,
28 'error_code' => $errorCode,
29 'error_data' => $errorData,
37 * Function returns array of result expected from previous function.
42 function profile_get_expectedresult() {
44 $expectedResult = array(
50 'postal_code-1' => '90210',
51 'state_province-1' => '1021',
52 'country-1' => '1228',
53 'phone-1-1' => '021 512 755',
54 'email-Primary' => 'abc1.xyz1@yahoo.com',
55 'last_name' => 'xyz1',
56 'first_name' => 'abc1',
57 'email-primary' => 'abc1.xyz1@yahoo.com',
60 'first_name' => 'abc1',
61 'last_name' => 'xyz1',
62 'street_address-1' => '5 Saint Helier St',
63 'city-1' => 'Gotham City',
64 'postal_code-1' => '90210',
65 'country-1' => '1228',
66 'state_province-1' => '1021',
69 'billing_first_name' => 'abc1',
70 'billing_middle_name' => 'J.',
71 'billing_last_name' => 'xyz1',
72 'billing_street_address-5' => '5 Saint Helier St',
73 'billing_city-5' => 'Gotham City',
74 'billing_state_province_id-5' => '1021',
75 'billing_country_id-5' => '1228',
76 'billing_postal_code-5' => '90210',
77 'billing-email-5' => 'abc1.xyz1@yahoo.com',
78 'email-5' => 'abc1.xyz1@yahoo.com',
83 return $expectedResult;
87 * This example has been generated from the API test suite.
88 * The test that created it is called "testProfileGetMultiple"
89 * and can be found at:
90 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ProfileTest.php
92 * You can see the outcome of the API tests at
93 * https://test.civicrm.org/job/CiviCRM-master-git/
95 * To Learn about the API read
96 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
98 * Browse the api on your own site with the api explorer
99 * http://MYSITE.ORG/path/to/civicrm/api
101 * Read more about testing here
102 * http://wiki.civicrm.org/confluence/display/CRM/Testing
104 * API Standards documentation:
105 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards