2 class Event
extends PHPUnit_Framework_Testcase
{
4 * Helper function to create
7 * @return $event id of created Event
9 static function create($contactId) {
10 require_once "CRM/Event/BAO/Event.php";
12 'title' => 'Test Event',
14 'default_role_id' => 1,
15 'participant_listing_id' => 1,
16 'summary' => 'Created for Test Coverage BAO',
17 'description' => 'Test Coverage BAO',
19 'start_date' => '20080526200000',
20 'end_date' => '20080530200000',
22 'contact_id' => $contactId,
26 $event = CRM_Event_BAO_Event
::create($params);
31 * Helper function to delete an Event
33 * @param int $eventID id of the event to delete
34 * @return boolean true if event deleted, false otherwise
37 static function delete($eventId) {
38 return CRM_Event_BAO_Event
::del($eventId);