6 function membership_create_example(){
9 'membership_type_id' => 23,
10 'join_date' => '2009-01-21',
11 'start_date' => '2009-01-21',
12 'end_date' => '2009-12-21',
13 'source' => 'Payment',
17 'custom_2' => 'custom string',
20 $result = civicrm_api( 'membership','create',$params );
26 * Function returns array of result expected from previous function
28 function membership_create_expectedresult(){
30 $expectedResult = array(
39 'membership_type_id' => '23',
40 'join_date' => '20090121000000',
41 'start_date' => '20090121000000',
42 'end_date' => '20091221000000',
43 'source' => 'Payment',
46 'owner_membership_id' => '',
50 'contribution_recur_id' => '',
56 return $expectedResult ;
61 * This example has been generated from the API test suite. The test that created it is called
63 * testCreateWithCustom and can be found in
64 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/MembershipTest.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