コード例 #1
0
ファイル: NoteTest.php プロジェクト: ksecor/civicrm
 /**
  * Check civicrm_note_create
  */
 function testCreate()
 {
     $result = civicrm_note_create($this->_params);
     $this->assertEquals($result['note'], 'Hello!!! m testing Note');
     $this->assertArrayHasKey('entity_id', $result);
     $this->assertEquals($result['is_error'], 0);
     $note = array('id' => $result['id']);
     $this->noteDelete($note);
 }
コード例 #2
0
ファイル: Note.php プロジェクト: ksecor/civicrm
/**
 * Updates an existing note with information
 * 
 * @params  array  $params   Params array
 * 
 * @return null
 * @access public
 *
 * @todo Probably needs some work
 */
function &civicrm_note_update(&$params)
{
    return civicrm_note_create($params);
}
コード例 #3
0
ファイル: CiviUnitTestCase.php プロジェクト: ksecor/civicrm
 /**
  * Function to create note
  * 
  * @params array $params  name-value pair for an event
  * 
  * @return array $note
  */
 function noteCreate($cId)
 {
     require_once 'api/v2/Note.php';
     $params = array('entity_table' => 'civicrm_contact', 'entity_id' => $cId, 'note' => 'hello I am testing Note', 'contact_id' => $cId, 'modified_date' => date('Ymd'), 'subject' => 'Test Note');
     $note =& civicrm_note_create($params);
     return $note;
 }