Merge pull request #1032 from ravishnair/CRM-12823
[civicrm-core.git] / api / v3 / examples / Event / IsFullOption.php
1 <?php
2
3 /*
4 demonstrates use of return is_full
5 */
6 function event_getsingle_example(){
7 $params = array(
8 'id' => 1,
9 'version' => 3,
10 'return.is_full' => 1,
11 );
12
13 $result = civicrm_api( 'event','getsingle',$params );
14
15 return $result;
16 }
17
18 /*
19 * Function returns array of result expected from previous function
20 */
21 function event_getsingle_expectedresult(){
22
23 $expectedResult = array(
24 'id' => '1',
25 'title' => 'Annual CiviCRM meet',
26 'event_title' => 'Annual CiviCRM meet',
27 'event_type_id' => '1',
28 'participant_listing_id' => 0,
29 'is_public' => '1',
30 'start_date' => '2008-10-21 00:00:00',
31 'event_start_date' => '2008-10-21 00:00:00',
32 'is_online_registration' => 0,
33 'max_participants' => '1',
34 'is_monetary' => 0,
35 'is_map' => 0,
36 'is_active' => '1',
37 'is_show_location' => '1',
38 'default_role_id' => '1',
39 'is_email_confirm' => 0,
40 'is_pay_later' => 0,
41 'is_partial_payment' => 0,
42 'is_multiple_registrations' => 0,
43 'allow_same_participant_emails' => 0,
44 'is_template' => 0,
45 'created_date' => '2013-06-22 08:49:03',
46 'is_share' => '1',
47 'available_places' => 0,
48 'is_full' => '1',
49 );
50
51 return $expectedResult ;
52 }
53
54
55 /*
56 * This example has been generated from the API test suite. The test that created it is called
57 *
58 * testGetSingleReturnIsFull and can be found in
59 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/EventTest.php
60 *
61 * You can see the outcome of the API tests at
62 * http://tests.dev.civicrm.org/trunk/results-api_v3
63 *
64 * To Learn about the API read
65 * http://book.civicrm.org/developer/current/techniques/api/
66 *
67 * and review the wiki at
68 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
69 *
70 * Read more about testing here
71 * http://wiki.civicrm.org/confluence/display/CRM/Testing
72 *
73 * API Standards documentation:
74 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
75 */