update test generated examples
[civicrm-core.git] / api / v3 / examples / Event / IsCurrentOption.php
CommitLineData
6a488035
TO
1<?php
2
3/*
4 demonstrates use of is.Current option
5 */
6function event_get_example(){
53ca8fd7 7$params = array(
6a488035 8 'isCurrent' => 1,
53ca8fd7 9 'version' => 3,
10 'debug' => 0,
6a488035
TO
11);
12
13 $result = civicrm_api( 'event','get',$params );
14
15 return $result;
16}
17
18/*
19 * Function returns array of result expected from previous function
20 */
21function event_get_expectedresult(){
22
53ca8fd7 23 $expectedResult = array(
6a488035
TO
24 'is_error' => 0,
25 'version' => 3,
26 'count' => 1,
27 'id' => 3,
53ca8fd7 28 'values' => array(
29 '3' => array(
6a488035
TO
30 'id' => '3',
31 'title' => 'Annual CiviCRM meet 2',
32 'event_title' => 'Annual CiviCRM meet 2',
33 'summary' => 'If you have any CiviCRM realted issues or want to track where CiviCRM is heading, Sign up now',
34 'description' => 'This event is intended to give brief idea about progess of CiviCRM and giving solutions to common user issues',
35 'event_description' => 'This event is intended to give brief idea about progess of CiviCRM and giving solutions to common user issues',
36 'event_type_id' => '1',
37 'participant_listing_id' => 0,
38 'is_public' => '1',
53ca8fd7 39 'start_date' => '2013-06-23 00:00:00',
40 'event_start_date' => '2013-06-23 00:00:00',
41 'end_date' => '2013-06-29 00:00:00',
42 'event_end_date' => '2013-06-29 00:00:00',
6a488035
TO
43 'is_online_registration' => '1',
44 'registration_start_date' => '2010-06-01 00:00:00',
45 'registration_end_date' => '2010-10-15 00:00:00',
46 'max_participants' => '100',
47 'event_full_text' => 'Sorry! We are already full',
48 'is_monetary' => 0,
49 'is_map' => 0,
50 'is_active' => '1',
51 'is_show_location' => 0,
52 'default_role_id' => '1',
53 'is_email_confirm' => 0,
54 'is_pay_later' => 0,
55 'is_partial_payment' => 0,
56 'is_multiple_registrations' => 0,
57 'allow_same_participant_emails' => 0,
58 'is_template' => 0,
53ca8fd7 59 'created_date' => '20120130621222105',
6a488035
TO
60 'is_share' => '1',
61 ),
62 ),
63);
64
65 return $expectedResult ;
66}
67
68
69/*
70* This example has been generated from the API test suite. The test that created it is called
71*
72* testGetIsCurrent and can be found in
73* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/EventTest.php
74*
75* You can see the outcome of the API tests at
76* http://tests.dev.civicrm.org/trunk/results-api_v3
77*
78* To Learn about the API read
79* http://book.civicrm.org/developer/current/techniques/api/
80*
81* and review the wiki at
82* http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
83*
84* Read more about testing here
85* http://wiki.civicrm.org/confluence/display/CRM/Testing
86*
87* API Standards documentation:
88* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
89*/