4 * Test Generated API Example.
5 * See bottom of this file for more detail.
9 * Test Generated example of using participant_status_type create API.
15 function participant_status_type_create_example() {
17 'name' => 'test status',
18 'label' => 'I am a test',
19 'class' => 'Positive',
28 $result = civicrm_api3('participant_status_type', 'create', $params);
30 catch (CiviCRM_API3_Exception
$e) {
32 $errorMessage = $e->getMessage();
33 $errorCode = $e->getErrorCode();
34 $errorData = $e->getExtraParams();
36 'error' => $errorMessage,
37 'error_code' => $errorCode,
38 'error_data' => $errorData,
46 * Function returns array of result expected from previous function.
51 function participant_status_type_create_expectedresult() {
53 $expectedResult = array(
61 'name' => 'test status',
62 'label' => 'I am a test',
68 'visibility_id' => '1',
73 return $expectedResult;
77 * This example has been generated from the API test suite.
78 * The test that created it is called
79 * testCreateParticipantStatusType
81 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantStatusTypeTest.php
83 * You can see the outcome of the API tests at
84 * https://test.civicrm.org/job/CiviCRM-master-git/
86 * To Learn about the API read
87 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
89 * Browse the api on your own site with the api explorer
90 * http://MYSITE.ORG/path/to/civicrm/api/explorer
92 * Read more about testing here
93 * http://wiki.civicrm.org/confluence/display/CRM/Testing
95 * API Standards documentation:
96 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards