bf801c3eac02522d8d03b1a16bcda4e5ebf50264
3 * Test Generated example demonstrating the PriceSet.create API.
8 function price_set_create_example() {
10 'entity_table' => 'civicrm_event',
12 'name' => 'event price',
13 'title' => 'event price',
18 $result = civicrm_api3('PriceSet', 'create', $params);
20 catch (CiviCRM_API3_Exception
$e) {
22 $errorMessage = $e->getMessage();
23 $errorCode = $e->getErrorCode();
24 $errorData = $e->getExtraParams();
27 'error_message' => $errorMessage,
28 'error_code' => $errorCode,
29 'error_data' => $errorData,
37 * Function returns array of result expected from previous function.
42 function price_set_create_expectedresult() {
44 $expectedResult = array(
53 'name' => 'event price',
54 'title' => 'event price',
60 'financial_type_id' => '',
61 'is_quick_config' => '',
68 return $expectedResult;
72 * This example has been generated from the API test suite.
73 * The test that created it is called "testEventPriceSet"
74 * and can be found at:
75 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceSetTest.php
77 * You can see the outcome of the API tests at
78 * https://test.civicrm.org/job/CiviCRM-master-git/
80 * To Learn about the API read
81 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
83 * Browse the api on your own site with the api explorer
84 * http://MYSITE.ORG/path/to/civicrm/api
86 * Read more about testing here
87 * http://wiki.civicrm.org/confluence/display/CRM/Testing
89 * API Standards documentation:
90 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards