/** * 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); }
/** * 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); }
/** * 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; }