6 function survey_create_example(){
8 'title' => 'survey title',
9 'activity_type_id' => '35',
10 'max_number_of_contacts' => 12,
11 'instructions' => 'Call people, ask for money',
16 $result = civicrm_api( 'survey','create',$params );
22 * Function returns array of result expected from previous function
24 function survey_create_expectedresult(){
26 $expectedResult = array(
34 'title' => 'survey title',
36 'activity_type_id' => '35',
37 'recontact_interval' => '',
38 'instructions' => 'Call people, ask for money',
39 'release_frequency' => '',
40 'max_number_of_contacts' => '12',
41 'default_number_of_contacts' => '',
45 'created_date' => '20120130621222105',
46 'last_modified_id' => '',
47 'last_modified_date' => '',
49 'bypass_confirm' => '',
50 'thankyou_title' => '',
51 'thankyou_text' => '',
56 return $expectedResult ;
61 * This example has been generated from the API test suite. The test that created it is called
63 * testCreateSurvey and can be found in
64 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/SurveyTest.php
66 * You can see the outcome of the API tests at
67 * http://tests.dev.civicrm.org/trunk/results-api_v3
69 * To Learn about the API read
70 * http://book.civicrm.org/developer/current/techniques/api/
72 * and review the wiki at
73 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
75 * Read more about testing here
76 * http://wiki.civicrm.org/confluence/display/CRM/Testing
78 * API Standards documentation:
79 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards