8 function activity_create_example(){
10 'source_contact_id' => 17,
11 'activity_type_id' => 40,
12 'subject' => 'test activity type id',
13 'activity_date_time' => '2011-06-02 14:36:13',
17 'location' => 'Pensulvania',
18 'details' => 'a test activity',
20 'custom_1' => 'custom string',
23 require_once 'api/api.php';
24 $result = civicrm_api( 'activity','create',$params );
30 * Function returns array of result expected from previous function
32 function activity_create_expectedresult(){
34 $expectedResult = array(
42 'source_contact_id' => 17,
43 'source_record_id' => '',
44 'activity_type_id' => 40,
45 'subject' => 'test activity type id',
46 'activity_date_time' => '20110602143613',
48 'location' => 'Pensulvania',
51 'details' => 'a test activity',
58 'relationship_id' => '',
59 'is_current_revision' => '',
64 'engagement_level' => '',
70 return $expectedResult ;
77 * This example has been generated from the API test suite. The test that created it is called
79 * testActivityCreateCustom and can be found in
80 * http://svn.civicrm.org/civicrm/branches/v3.4/tests/phpunit/CiviTest/api/v3/ActivityTest.php
82 * You can see the outcome of the API tests at
83 * http://tests.dev.civicrm.org/trunk/results-api_v3
84 * and review the wiki at
85 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
86 * Read more about testing here
87 * http://wiki.civicrm.org/confluence/display/CRM/Testing