public function setUp()
 {
     parent::setUp();
     $this->_individualId = $this->individualCreate();
     $this->_pledgeID = $this->pledgeCreate($this->_individualId);
     $this->_contributionID = $this->contributionCreate(array('contact_id' => $this->_individualId));
 }
 function setUp()
 {
     parent::setUp();
     $config = CRM_Core_Config::singleton();
     $this->oldConfigAndLogDir = $config->configAndLogDir;
     $config->configAndLogDir = $this->createTempDir('test-log-');
 }
 function setUp()
 {
     // If your test manipulates any SQL tables, then you should truncate
     // them to ensure a consisting starting point for all tests
     // $this->quickCleanup(array('example_table_name'));
     parent::setUp();
 }
 public function setUp()
 {
     $this->_apiversion = 3;
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->_params = array('name' => 'Made Up Land', 'iso_code' => 'ZZ', 'region_id' => 1);
 }
 public function setUp()
 {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->ids['contact'][0] = $this->individualCreate();
     $this->params = array('contact_id' => $this->ids['contact'][0], 'installments' => '12', 'frequency_interval' => '1', 'amount' => '500', 'contribution_status_id' => 1, 'start_date' => '2012-01-01 00:00:00', 'currency' => 'USD', 'frequency_unit' => 'day');
 }
 public function setUp()
 {
     parent::setUp();
     $this->_contactId = $this->individualCreate();
     $event = $this->eventCreate();
     $this->_eventId = $event['id'];
 }
 function setUp()
 {
     parent::setUp();
     $this->_individualId = $this->individualCreate();
     $this->_pledgeID = $this->pledgeCreate($this->_individualId);
     $this->_contributionID = $this->contributionCreate($this->_individualId);
 }
 function setUp()
 {
     $phoneBankActivityTypeID = $this->callAPISuccessGetValue('Option_value', array('label' => 'PhoneBank', 'return' => 'value'), 'integer');
     $this->enableCiviCampaign();
     $this->params = array('title' => "survey title", 'activity_type_id' => $phoneBankActivityTypeID, 'max_number_of_contacts' => 12, 'instructions' => "Call people, ask for money");
     parent::setUp();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->cleanupFiles();
     file_put_contents($this->tmpFile('mytest.txt'), 'This comes from a file');
 }
 public function setUp()
 {
     $this->_apiversion = 3;
     $this->params = array('title' => "campaign title", 'description' => "Call people, ask for money", 'created_date' => 'first sat of July 2008');
     parent::setUp();
     $this->useTransaction(TRUE);
 }
 /**
  * Set up for tests.
  */
 public function setUp()
 {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->_apiversion = 3;
     $this->_contactID = $this->organizationCreate();
 }
 public function setUp()
 {
     $this->_apiversion = 3;
     $this->params = array('name' => 'test status', 'label' => 'I am a test', 'class' => 'Positive', 'is_reserved' => 0, 'is_active' => 1, 'is_counted' => 1, 'visibility_id' => 1, 'weight' => 10);
     parent::setUp();
     $this->useTransaction(TRUE);
 }
 public function setUp()
 {
     parent::setUp();
     $this->contactIds[] = $this->individualCreate();
     $this->params = array('title' => "Test Contribution Page", 'financial_type_id' => 1, 'currency' => 'NZD', 'goal_amount' => $this->testAmount, 'is_pay_later' => 1, 'is_monetary' => TRUE, 'is_email_receipt' => TRUE, 'receipt_from_email' => '*****@*****.**', 'receipt_from_name' => 'Ego Freud');
     $this->_priceSetParams = array('is_quick_config' => 1, 'extends' => 'CiviContribute', 'financial_type_id' => 'Donation', 'title' => 'my Page');
 }
 public function setUp()
 {
     parent::setUp();
     $this->loadAllFixtures();
     CRM_Core_BAO_ConfigSetting::enableComponent('CiviCase');
     CRM_Core_BAO_ConfigSetting::enableComponent('CiviCampaign');
 }
 public function setUp()
 {
     parent::setUp();
     //create contact subtypes
     $params = array('label' => 'indivi_student', 'name' => 'indivi_student', 'parent_id' => 1, 'is_active' => 1);
     $result = CRM_Contact_BAO_ContactType::add($params);
     $this->student = $params['name'];
     $params = array('label' => 'indivi_parent', 'name' => 'indivi_parent', 'parent_id' => 1, 'is_active' => 1);
     $result = CRM_Contact_BAO_ContactType::add($params);
     $this->parent = $params['name'];
     $params = array('label' => 'org_sponsor', 'name' => 'org_sponsor', 'parent_id' => 3, 'is_active' => 1);
     $result = CRM_Contact_BAO_ContactType::add($params);
     $this->sponsor = $params['name'];
     //create contacts
     $params = array('first_name' => 'Anne', 'last_name' => 'Grant', 'contact_type' => 'Individual');
     $this->individual = Contact::create($params);
     $params = array('first_name' => 'Bill', 'last_name' => 'Adams', 'contact_type' => 'Individual', 'contact_sub_type' => $this->student);
     $this->indivi_student = Contact::create($params);
     $params = array('first_name' => 'Alen', 'last_name' => 'Adams', 'contact_type' => 'Individual', 'contact_sub_type' => $this->parent);
     $this->indivi_parent = Contact::create($params);
     $params = array('organization_name' => 'Compumentor', 'contact_type' => 'Organization');
     $this->organization = Contact::create($params);
     $params = array('organization_name' => 'Conservation Corp', 'contact_type' => 'Organization', 'contact_sub_type' => $this->sponsor);
     $this->organization_sponsor = Contact::create($params);
 }
 public function setUp()
 {
     parent::setUp();
     $this->contactIds[] = $this->individualCreate();
     $this->params = array('title' => "Test Contribution Page", 'financial_type_id' => 1, 'currency' => 'NZD', 'goal_amount' => $this->testAmount, 'is_pay_later' => 1, 'is_monetary' => TRUE);
     $this->_priceSetParams = array('is_quick_config' => 1, 'extends' => 'CiviContribute', 'financial_type_id' => 'Donation', 'title' => 'my Page');
 }
 public function setUp()
 {
     parent::setUp();
     require_once 'CiviTest/CiviMailUtils.php';
     $this->mut = new CiviMailUtils($this, TRUE);
     $this->fixtures['rolling_membership'] = array('membership_type_id' => array('period_type' => 'rolling', 'duration_unit' => 'month', 'duration_interval' => '3', 'is_active' => 1), 'join_date' => '20120315', 'start_date' => '20120315', 'end_date' => '20120615', 'is_override' => 0);
     $this->fixtures['rolling_membership_past'] = array('membership_type_id' => array('period_type' => 'rolling', 'duration_unit' => 'month', 'duration_interval' => '3', 'is_active' => 1), 'join_date' => '20100310', 'start_date' => '20100310', 'end_date' => '20100610', 'is_override' => 'NULL');
     $this->fixtures['participant'] = array('event_id' => array('is_active' => 1, 'is_template' => 0, 'title' => 'Example Event', 'start_date' => '20120315', 'end_date' => '20120615'), 'role_id' => '1', 'status_id' => '8');
     $this->fixtures['phonecall'] = array('status_id' => 1, 'activity_type_id' => 2, 'activity_date_time' => '20120615100000', 'is_current_revision' => 1, 'is_deleted' => 0);
     $this->fixtures['contact'] = array('is_deceased' => 0, 'contact_type' => 'Individual', 'email' => '*****@*****.**', 'gender_id' => 'Female');
     $this->fixtures['contact_birthdate'] = array('is_deceased' => 0, 'contact_type' => 'Individual', 'email' => '*****@*****.**', 'birth_date' => '20050707');
     $this->fixtures['sched_activity_1day'] = array('name' => 'One_Day_Phone_Call_Notice', 'title' => 'One Day Phone Call Notice', 'limit_to' => '1', 'absolute_date' => NULL, 'body_html' => '<p>1-Day (non-repeating)</p>', 'body_text' => '1-Day (non-repeating)', 'end_action' => NULL, 'end_date' => NULL, 'end_frequency_interval' => NULL, 'end_frequency_unit' => NULL, 'entity_status' => '1', 'entity_value' => '2', 'group_id' => NULL, 'is_active' => '1', 'is_repeat' => '0', 'mapping_id' => '1', 'msg_template_id' => NULL, 'recipient' => '2', 'recipient_listing' => NULL, 'recipient_manual' => NULL, 'record_activity' => NULL, 'repetition_frequency_interval' => NULL, 'repetition_frequency_unit' => NULL, 'start_action_condition' => 'before', 'start_action_date' => 'activity_date_time', 'start_action_offset' => '1', 'start_action_unit' => 'day', 'subject' => '1-Day (non-repeating) (about {activity.activity_type})');
     $this->fixtures['sched_activity_1day_r'] = array('name' => 'One_Day_Phone_Call_Notice_R', 'title' => 'One Day Phone Call Notice R', 'limit_to' => 1, 'absolute_date' => NULL, 'body_html' => '<p>1-Day (repeating)</p>', 'body_text' => '1-Day (repeating)', 'end_action' => 'after', 'end_date' => 'activity_date_time', 'end_frequency_interval' => '2', 'end_frequency_unit' => 'day', 'entity_status' => '1', 'entity_value' => '2', 'group_id' => NULL, 'is_active' => '1', 'is_repeat' => '1', 'mapping_id' => '1', 'msg_template_id' => NULL, 'recipient' => '2', 'recipient_listing' => NULL, 'recipient_manual' => NULL, 'record_activity' => NULL, 'repetition_frequency_interval' => '6', 'repetition_frequency_unit' => 'hour', 'start_action_condition' => 'before', 'start_action_date' => 'activity_date_time', 'start_action_offset' => '1', 'start_action_unit' => 'day', 'subject' => '1-Day (repeating) (about {activity.activity_type})');
     $this->fixtures['sched_membership_join_2week'] = array('name' => 'sched_membership_join_2week', 'title' => 'sched_membership_join_2week', 'absolute_date' => '', 'body_html' => '<p>body sched_membership_join_2week</p>', 'body_text' => 'body sched_membership_join_2week', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '', 'end_frequency_unit' => '', 'entity_status' => '', 'entity_value' => '', 'group_id' => '', 'is_active' => 1, 'is_repeat' => '0', 'mapping_id' => 4, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '', 'repetition_frequency_unit' => '', 'start_action_condition' => 'after', 'start_action_date' => 'membership_join_date', 'start_action_offset' => '2', 'start_action_unit' => 'week', 'subject' => 'subject sched_membership_join_2week (joined {membership.join_date})');
     $this->fixtures['sched_membership_end_2week'] = array('name' => 'sched_membership_end_2week', 'title' => 'sched_membership_end_2week', 'absolute_date' => '', 'body_html' => '<p>body sched_membership_end_2week</p>', 'body_text' => 'body sched_membership_end_2week', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '', 'end_frequency_unit' => '', 'entity_status' => '', 'entity_value' => '', 'group_id' => '', 'is_active' => 1, 'is_repeat' => '0', 'mapping_id' => 4, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '', 'repetition_frequency_unit' => '', 'start_action_condition' => 'before', 'start_action_date' => 'membership_end_date', 'start_action_offset' => '2', 'start_action_unit' => 'week', 'subject' => 'subject sched_membership_end_2week');
     $this->fixtures['sched_on_membership_end_date'] = array('name' => 'sched_on_membership_end_date', 'title' => 'sched_on_membership_end_date', 'body_html' => '<p>Your membership expired today</p>', 'body_text' => 'Your membership expired today', 'is_active' => 1, 'mapping_id' => 4, 'record_activity' => 1, 'start_action_condition' => 'after', 'start_action_date' => 'membership_end_date', 'start_action_offset' => '0', 'start_action_unit' => 'hour', 'subject' => 'subject send reminder on membership_end_date');
     $this->fixtures['sched_after_1day_membership_end_date'] = array('name' => 'sched_after_1day_membership_end_date', 'title' => 'sched_after_1day_membership_end_date', 'body_html' => '<p>Your membership expired yesterday</p>', 'body_text' => 'Your membership expired yesterday', 'is_active' => 1, 'mapping_id' => 4, 'record_activity' => 1, 'start_action_condition' => 'after', 'start_action_date' => 'membership_end_date', 'start_action_offset' => '1', 'start_action_unit' => 'day', 'subject' => 'subject send reminder on membership_end_date');
     $this->fixtures['sched_membership_end_2month'] = array('name' => 'sched_membership_end_2month', 'title' => 'sched_membership_end_2month', 'absolute_date' => '', 'body_html' => '<p>body sched_membership_end_2month</p>', 'body_text' => 'body sched_membership_end_2month', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '', 'end_frequency_unit' => '', 'entity_status' => '', 'entity_value' => '', 'group_id' => '', 'is_active' => 1, 'is_repeat' => '0', 'mapping_id' => 4, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '', 'repetition_frequency_unit' => '', 'start_action_condition' => 'after', 'start_action_date' => 'membership_end_date', 'start_action_offset' => '2', 'start_action_unit' => 'month', 'subject' => 'subject sched_membership_end_2month');
     $this->fixtures['sched_contact_bday_yesterday'] = array('name' => 'sched_contact_bday_yesterday', 'title' => 'sched_contact_bday_yesterday', 'absolute_date' => '', 'body_html' => '<p>you look like you were born yesterday!</p>', 'body_text' => 'you look like you were born yesterday!', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '', 'end_frequency_unit' => '', 'entity_status' => 1, 'entity_value' => 'birth_date', 'group_id' => '', 'is_active' => 1, 'is_repeat' => '0', 'mapping_id' => 6, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '', 'repetition_frequency_unit' => '', 'start_action_condition' => 'after', 'start_action_date' => 'date_field', 'start_action_offset' => '1', 'start_action_unit' => 'day', 'subject' => 'subject sched_contact_bday_yesterday');
     $this->fixtures['sched_contact_bday_anniv'] = array('name' => 'sched_contact_bday_anniv', 'title' => 'sched_contact_bday_anniv', 'absolute_date' => '', 'body_html' => '<p>happy birthday!</p>', 'body_text' => 'happy birthday!', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '', 'end_frequency_unit' => '', 'entity_status' => 2, 'entity_value' => 'birth_date', 'group_id' => '', 'is_active' => 1, 'is_repeat' => '0', 'mapping_id' => 6, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '', 'repetition_frequency_unit' => '', 'start_action_condition' => 'before', 'start_action_date' => 'date_field', 'start_action_offset' => '1', 'start_action_unit' => 'day', 'subject' => 'subject sched_contact_bday_anniv');
     $this->fixtures['sched_contact_grad_tomorrow'] = array('name' => 'sched_contact_grad_tomorrow', 'title' => 'sched_contact_grad_tomorrow', 'absolute_date' => '', 'body_html' => '<p>congratulations on your graduation!</p>', 'body_text' => 'congratulations on your graduation!', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '', 'end_frequency_unit' => '', 'entity_status' => 1, 'group_id' => '', 'is_active' => 1, 'is_repeat' => '0', 'mapping_id' => 6, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '', 'repetition_frequency_unit' => '', 'start_action_condition' => 'before', 'start_action_date' => 'date_field', 'start_action_offset' => '1', 'start_action_unit' => 'day', 'subject' => 'subject sched_contact_grad_tomorrow');
     $this->fixtures['sched_contact_grad_anniv'] = array('name' => 'sched_contact_grad_anniv', 'title' => 'sched_contact_grad_anniv', 'absolute_date' => '', 'body_html' => '<p>dear alum, please send us money.</p>', 'body_text' => 'dear alum, please send us money.', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '', 'end_frequency_unit' => '', 'entity_status' => 2, 'group_id' => '', 'is_active' => 1, 'is_repeat' => '0', 'mapping_id' => 6, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '', 'repetition_frequency_unit' => '', 'start_action_condition' => 'after', 'start_action_date' => 'date_field', 'start_action_offset' => '1', 'start_action_unit' => 'week', 'subject' => 'subject sched_contact_grad_anniv');
     $this->fixtures['sched_contact_created_yesterday'] = array('name' => 'sched_contact_created_yesterday', 'title' => 'sched_contact_created_yesterday', 'absolute_date' => '', 'body_html' => '<p>Your contact was created yesterday</p>', 'body_text' => 'Your contact was created yesterday!', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '', 'end_frequency_unit' => '', 'entity_status' => 1, 'entity_value' => 'created_date', 'group_id' => '', 'is_active' => 1, 'is_repeat' => '0', 'mapping_id' => 6, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '', 'repetition_frequency_unit' => '', 'start_action_condition' => 'after', 'start_action_date' => 'date_field', 'start_action_offset' => '1', 'start_action_unit' => 'day', 'subject' => 'subject sched_contact_created_yesterday');
     $this->fixtures['sched_contact_mod_anniv'] = array('name' => 'sched_contact_mod_anniv', 'title' => 'sched_contact_mod_anniv', 'absolute_date' => '', 'body_html' => '<p>You last updated your data last year</p>', 'body_text' => 'Go update your stuff!', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '', 'end_frequency_unit' => '', 'entity_status' => 2, 'entity_value' => 'modified_date', 'group_id' => '', 'is_active' => 1, 'is_repeat' => '0', 'mapping_id' => 6, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '', 'repetition_frequency_unit' => '', 'start_action_condition' => 'before', 'start_action_date' => 'date_field', 'start_action_offset' => '1', 'start_action_unit' => 'day', 'subject' => 'subject sched_contact_mod_anniv');
     $this->fixtures['sched_eventtype_start_1week_before'] = array('name' => 'sched_eventtype_start_1week_before', 'title' => 'sched_eventtype_start_1week_before', 'absolute_date' => '', 'body_html' => '<p>body sched_eventtype_start_1week_before ({event.title})</p>', 'body_text' => 'body sched_eventtype_start_1week_before ({event.title})', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '', 'end_frequency_unit' => '', 'entity_status' => '', 'entity_value' => '', 'group_id' => '', 'is_active' => 1, 'is_repeat' => '0', 'mapping_id' => 2, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '', 'repetition_frequency_unit' => '', 'start_action_condition' => 'before', 'start_action_date' => 'event_start_date', 'start_action_offset' => '1', 'start_action_unit' => 'week', 'subject' => 'subject sched_eventtype_start_1week_before ({event.title})');
     $this->fixtures['sched_eventtype_end_2month_repeat_twice_2_weeks'] = array('name' => 'sched_eventtype_end_2month_repeat_twice_2_weeks', 'title' => 'sched_eventtype_end_2month_repeat_twice_2_weeks', 'absolute_date' => '', 'body_html' => '<p>body sched_eventtype_end_2month_repeat_twice_2_weeks {event.title}</p>', 'body_text' => 'body sched_eventtype_end_2month_repeat_twice_2_weeks {event.title}', 'end_action' => 'after', 'end_date' => 'event_end_date', 'end_frequency_interval' => '3', 'end_frequency_unit' => 'month', 'entity_status' => '', 'entity_value' => '', 'group_id' => '', 'is_active' => 1, 'is_repeat' => '1', 'mapping_id' => 2, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '2', 'repetition_frequency_unit' => 'week', 'start_action_condition' => 'after', 'start_action_date' => 'event_end_date', 'start_action_offset' => '2', 'start_action_unit' => 'month', 'subject' => 'subject sched_eventtype_end_2month_repeat_twice_2_weeks {event.title}');
     $this->fixtures['sched_membership_end_2month_repeat_twice_4_weeks'] = array('name' => 'sched_membership_end_2month', 'title' => 'sched_membership_end_2month', 'absolute_date' => '', 'body_html' => '<p>body sched_membership_end_2month</p>', 'body_text' => 'body sched_membership_end_2month', 'end_action' => '', 'end_date' => 'membership_end_date', 'end_frequency_interval' => '4', 'end_frequency_unit' => 'month', 'entity_status' => '', 'entity_value' => '', 'group_id' => '', 'is_active' => 1, 'is_repeat' => '1', 'mapping_id' => 4, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '4', 'repetition_frequency_unit' => 'week', 'start_action_condition' => 'after', 'start_action_date' => 'membership_end_date', 'start_action_offset' => '2', 'start_action_unit' => 'month', 'subject' => 'subject sched_membership_end_2month');
     $this->fixtures['sched_membership_end_limit_to_none'] = array('name' => 'limit to none', 'title' => 'limit to none', 'absolute_date' => '', 'body_html' => '<p>body sched_membership_end_2month</p>', 'body_text' => 'body sched_membership_end_2month', 'end_action' => '', 'end_date' => '', 'end_frequency_interval' => '4', 'end_frequency_unit' => 'month', 'entity_status' => '', 'entity_value' => '', 'limit_to' => 0, 'group_id' => '', 'is_active' => 1, 'is_repeat' => '1', 'mapping_id' => 4, 'msg_template_id' => '', 'recipient' => '', 'recipient_listing' => '', 'recipient_manual' => '', 'record_activity' => 1, 'repetition_frequency_interval' => '4', 'repetition_frequency_unit' => 'week', 'start_action_condition' => 'after', 'start_action_date' => 'membership_end_date', 'start_action_offset' => '2', 'start_action_unit' => 'month', 'subject' => 'limit to none');
     $this->fixtures['sched_on_membership_end_date_repeat_interval'] = array('name' => 'sched_on_membership_end_date', 'title' => 'sched_on_membership_end_date', 'body_html' => '<p>Your membership expired 1 unit ago</p>', 'body_text' => 'Your membership expired 1 unit ago', 'end_frequency_interval' => 10, 'end_frequency_unit' => 'year', 'is_active' => 1, 'is_repeat' => TRUE, 'mapping_id' => 4, 'record_activity' => 1, 'start_action_condition' => 'after', 'start_action_date' => 'membership_end_date', 'start_action_offset' => '0', 'start_action_unit' => 'hour', 'subject' => 'subject send reminder every unit after membership_end_date');
     $this->_setUp();
 }
Exemple #18
0
 public function setUp()
 {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->tag = $this->tagCreate();
     $this->ids['tag'][] = $this->tagID = $this->tag['id'];
 }
 function setUp()
 {
     parent::setUp();
     $students = 'indivi_student' . substr(sha1(rand()), 0, 7);
     $params = array('label' => $students, 'name' => $students, 'parent_id' => 1, 'is_active' => 1);
     $result = CRM_Contact_BAO_ContactType::add($params);
     $this->student = $params['name'];
     $parents = 'indivi_parent' . substr(sha1(rand()), 0, 7);
     $params = array('label' => $parents, 'name' => $parents, 'parent_id' => 1, 'is_active' => 1);
     $result = CRM_Contact_BAO_ContactType::add($params);
     $this->parent = $params['name'];
     $orgs = 'org_sponsor' . substr(sha1(rand()), 0, 7);
     $params = array('label' => $orgs, 'name' => $orgs, 'parent_id' => 3, 'is_active' => 1);
     $result = CRM_Contact_BAO_ContactType::add($params);
     $this->sponsor = $params['name'];
     $this->indiviParams = array('first_name' => 'Anne', 'last_name' => 'Grant', 'contact_type' => 'Individual');
     $this->individual = Contact::create($this->indiviParams);
     $this->indiviStudentParams = array('first_name' => 'Bill', 'last_name' => 'Adams', 'contact_type' => 'Individual', 'contact_sub_type' => $this->student);
     $this->indiviStudent = Contact::create($this->indiviStudentParams);
     $this->indiviParentParams = array('first_name' => 'Alen', 'last_name' => 'Adams', 'contact_type' => 'Individual', 'contact_sub_type' => $this->parent);
     $this->indiviParent = Contact::create($this->indiviParentParams);
     $this->organizationParams = array('organization_name' => 'Compumentor', 'contact_type' => 'Organization');
     $this->organization = Contact::create($this->organizationParams);
     $this->orgSponsorParams = array('organization_name' => 'Conservation Corp', 'contact_type' => 'Organization', 'contact_sub_type' => $this->sponsor);
     $this->orgSponsor = Contact::create($this->orgSponsorParams);
     $this->householdParams = array('household_name' => "John Doe's home", 'contact_type' => 'Household');
     $this->household = Contact::create($this->householdParams);
 }
Exemple #20
0
 public function setUp()
 {
     parent::setUp();
     global $civicrm_setting;
     $this->origSetting = $civicrm_setting;
     CRM_Utils_Cache::singleton()->flush();
 }
 public function setUp()
 {
     parent::setUp();
     $this->quickCleanup(array('civicrm_contact', 'civicrm_activity'));
     $this->callbackLog = array();
     $this->cids = array();
 }
 function setUp()
 {
     parent::setUp();
     $this->_entity = 'im';
     $this->_contactID = $this->organizationCreate();
     $this->params = array('contact_id' => $this->_contactID, 'name' => 'My Yahoo IM Handle', 'location_type_id' => 1, 'provider_id' => 1);
 }
Exemple #23
0
 public function setUp()
 {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->_entity = 'mapping';
     $this->params = array('name' => 'Mapping name', 'description' => 'Mapping description', 'mapping_type_id' => 7);
 }
 public function setUp()
 {
     $this->_apiversion = 3;
     CRM_Core_PseudoConstant::activityType(TRUE, TRUE, TRUE, 'name');
     parent::setUp();
     $this->useTransaction(TRUE);
 }
 public function setUp()
 {
     $this->_apiversion = 3;
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->_params = array('name' => 'test_check', 'domain_id' => 1, 'hush_until' => '20151212', 'ignore_severity' => 4, 'check_info' => NULL);
 }
 function setUp()
 {
     parent::setUp();
     //  Create Group For Individual  Contact Type
     $groupIndividual = array('title' => 'TestGroup For Indivi' . substr(sha1(rand()), 0, 5), 'extends' => array('Individual'), 'style' => 'Inline', 'is_active' => 1);
     $this->CustomGroupIndividual = $this->customGroupCreate($groupIndividual);
     $this->IndividualField = $this->customFieldCreate(array('custom_group_id' => $this->CustomGroupIndividual['id']));
     //  Create Group For Individual-Student  Contact Sub  Type
     $groupIndiStudent = array('title' => 'Student Test' . substr(sha1(rand()), 0, 5), 'extends' => array('Individual', array('Student')), 'style' => 'Inline', 'is_active' => 1);
     $this->CustomGroupIndiStudent = $this->customGroupCreate($groupIndiStudent);
     $this->IndiStudentField = $this->customFieldCreate(array('custom_group_id' => $this->CustomGroupIndiStudent['id']));
     $params = array('first_name' => 'Mathev', 'last_name' => 'Adison', 'contact_type' => 'Individual');
     $this->individual = $this->individualCreate($params);
     $params = array('first_name' => 'Steve', 'last_name' => 'Tosun', 'contact_type' => 'Individual', 'contact_sub_type' => 'Student');
     $this->individualStudent = $this->individualCreate($params);
     $params = array('first_name' => 'Mark', 'last_name' => 'Dawson', 'contact_type' => 'Individual', 'contact_sub_type' => 'Parent');
     $this->individualParent = $this->individualCreate($params);
     $params = array('organization_name' => 'Wellspring', 'contact_type' => 'Organization');
     $this->organization = $this->organizationCreate($params);
     $params = array('organization_name' => 'SubUrban', 'contact_type' => 'Organization', 'contact_sub_type' => 'Sponsor');
     $this->organizationSponsor = $this->organizationCreate($params);
     //refresh php cached variables
     CRM_Core_PseudoConstant::flush();
     CRM_Core_BAO_CustomField::getTableColumnGroup($this->IndividualField['id'], True);
     CRM_Core_BAO_CustomField::getTableColumnGroup($this->IndiStudentField['id'], True);
 }
Exemple #27
0
 public function setUp()
 {
     parent::setUp();
     $this->membershipTypeID = $this->membershipTypeCreate(array('name' => 'General'));
     $this->useTransaction(TRUE);
     $this->_params = array('sequential' => 1, 'name' => 'API_Test_Job', 'description' => 'A long description written by hand in cursive', 'run_frequency' => 'Daily', 'api_entity' => 'ApiTestEntity', 'api_action' => 'apitestaction', 'parameters' => 'Semi-formal explanation of runtime job parameters', 'is_active' => 1);
 }
Exemple #28
0
 /**
  * Setup function.
  */
 public function setUp()
 {
     parent::setUp();
     $this->_apiversion = 3;
     $this->_individualId = $this->individualCreate();
     CRM_Core_Config::singleton()->userPermissionClass->permissions = array();
 }
Exemple #29
0
 public function setUp()
 {
     parent::setUp();
     $this->queueService = CRM_Queue_Service::singleton(TRUE);
     $this->queue = $this->queueService->create(array('type' => 'Sql', 'name' => 'test-queue'));
     self::$_recordedValues = array();
 }
 function setUp()
 {
     parent::setUp();
     $this->_groupID = $this->groupCreate();
     $this->_email = '*****@*****.**';
     $this->_params = array('subject' => 'maild', 'body_text' => 'bdkfhdskfhduew', 'name' => 'mailing name', 'created_id' => 1);
 }