6 function relationship_create_example(){
10 'relationship_type_id' => 19,
11 'start_date' => '2010-10-30',
12 'end_date' => '2010-12-30',
19 $result = civicrm_api( 'relationship','create',$params );
25 * Function returns array of result expected from previous function
27 function relationship_create_expectedresult(){
29 $expectedResult = array(
37 'contact_id_a' => '27',
38 'contact_id_b' => '28',
39 'relationship_type_id' => '19',
40 'start_date' => '20101030000000',
41 'end_date' => '20101230000000',
44 'is_permission_a_b' => 0,
45 'is_permission_b_a' => 0,
51 return $expectedResult ;
56 * This example has been generated from the API test suite. The test that created it is called
58 * testRelationshipCreate and can be found in
59 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/RelationshipTest.php
61 * You can see the outcome of the API tests at
62 * http://tests.dev.civicrm.org/trunk/results-api_v3
64 * To Learn about the API read
65 * http://book.civicrm.org/developer/current/techniques/api/
67 * and review the wiki at
68 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
70 * Read more about testing here
71 * http://wiki.civicrm.org/confluence/display/CRM/Testing
73 * API Standards documentation:
74 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards