6 function survey_create_example(){
9 'title' => 'survey title',
10 'activity_type_id' => '30',
11 'max_number_of_contacts' => 12,
12 'instructions' => 'Call people, ask for money',
15 $result = civicrm_api( 'survey','create',$params );
21 * Function returns array of result expected from previous function
23 function survey_create_expectedresult(){
25 $expectedResult = array(
33 'title' => 'survey title',
35 'activity_type_id' => '30',
36 'recontact_interval' => '',
37 'instructions' => 'Call people, ask for money',
38 'release_frequency' => '',
39 'max_number_of_contacts' => '12',
40 'default_number_of_contacts' => '',
44 'created_date' => '20130204224326',
45 'last_modified_id' => '',
46 'last_modified_date' => '',
48 'bypass_confirm' => '',
49 'thankyou_title' => '',
50 'thankyou_text' => '',
55 return $expectedResult ;
60 * This example has been generated from the API test suite. The test that created it is called
62 * testCreateSurvey and can be found in
63 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/SurveyTest.php
65 * You can see the outcome of the API tests at
66 * http://tests.dev.civicrm.org/trunk/results-api_v3
68 * To Learn about the API read
69 * http://book.civicrm.org/developer/current/techniques/api/
71 * and review the wiki at
72 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
74 * Read more about testing here
75 * http://wiki.civicrm.org/confluence/display/CRM/Testing
77 * API Standards documentation:
78 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards