3 * Test Generated example of using option_value get API
6 function option_value_get_example(){
8 'option_group_id' => 1,
12 $result = civicrm_api3('option_value', 'get', $params);
14 catch (CiviCRM_API3_Exception
$e) {
16 $errorMessage = $e->getMessage();
17 $errorCode = $e->getErrorCode();
18 $errorData = $e->getExtraParams();
19 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
26 * Function returns array of result expected from previous function
28 function option_value_get_expectedresult(){
30 $expectedResult = array(
37 'option_group_id' => '1',
48 'option_group_id' => '1',
59 'option_group_id' => '1',
60 'label' => 'Postal Mail',
70 'option_group_id' => '1',
81 'option_group_id' => '1',
93 return $expectedResult;
98 * This example has been generated from the API test suite. The test that created it is called
100 * testGetOptionGroup and can be found in
101 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/OptionValueTest.php
103 * You can see the outcome of the API tests at
104 * http://tests.dev.civicrm.org/trunk/results-api_v3
106 * To Learn about the API read
107 * http://book.civicrm.org/developer/current/techniques/api/
109 * and review the wiki at
110 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
112 * Read more about testing here
113 * http://wiki.civicrm.org/confluence/display/CRM/Testing
115 * API Standards documentation:
116 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards