3 * Test Generated example of using event get API
6 function event_get_example(){
8 'event_title' => 'Annual CiviCRM meet',
13 $result = civicrm_api3('event', 'get', $params);
15 catch (CiviCRM_API3_Exception
$e) {
17 $errorMessage = $e->getMessage();
18 $errorCode = $e->getErrorCode();
19 $errorData = $e->getExtraParams();
20 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
27 * Function returns array of result expected from previous function
29 function event_get_expectedresult(){
31 $expectedResult = array(
39 'title' => 'Annual CiviCRM meet',
40 'event_title' => 'Annual CiviCRM meet',
41 'event_type_id' => '1',
42 'participant_listing_id' => 0,
44 'start_date' => '2013-07-29 00:00:00',
45 'event_start_date' => '2013-07-29 00:00:00',
46 'is_online_registration' => 0,
50 'is_show_location' => '1',
51 'default_role_id' => '1',
52 'is_email_confirm' => 0,
54 'is_partial_payment' => 0,
55 'is_multiple_registrations' => 0,
56 'allow_same_participant_emails' => 0,
58 'created_date' => '2013-07-28 08:49:19',
64 return $expectedResult;
69 * This example has been generated from the API test suite. The test that created it is called
71 * testGetEventByEventTitle and can be found in
72 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/EventTest.php
74 * You can see the outcome of the API tests at
75 * http://tests.dev.civicrm.org/trunk/results-api_v3
77 * To Learn about the API read
78 * http://book.civicrm.org/developer/current/techniques/api/
80 * and review the wiki at
81 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
83 * Read more about testing here
84 * http://wiki.civicrm.org/confluence/display/CRM/Testing
86 * API Standards documentation:
87 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards