3 * Test Generated example of using price_set set API
6 function price_set_set_example(){
8 'entity_table' => 'civicrm_event',
10 'name' => 'event price',
11 'title' => 'event price',
16 $result = civicrm_api3('price_set', 'set', $params);
18 catch (CiviCRM_API3_Exception
$e) {
20 $errorMessage = $e->getMessage();
21 $errorCode = $e->getErrorCode();
22 $errorData = $e->getExtraParams();
23 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
30 * Function returns array of result expected from previous function
32 function price_set_set_expectedresult(){
34 $expectedResult = array(
43 'name' => 'event price',
44 'title' => 'event price',
50 'financial_type_id' => '',
51 'is_quick_config' => '',
57 return $expectedResult;
62 * This example has been generated from the API test suite. The test that created it is called
64 * testEventPriceSet and can be found in
65 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/PriceSetTest.php
67 * You can see the outcome of the API tests at
68 * http://tests.dev.civicrm.org/trunk/results-api_v3
70 * To Learn about the API read
71 * http://book.civicrm.org/developer/current/techniques/api/
73 * and review the wiki at
74 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
76 * Read more about testing here
77 * http://wiki.civicrm.org/confluence/display/CRM/Testing
79 * API Standards documentation:
80 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards