当前位置: 首页>>代码示例>>PHP>>正文


PHP CiviUnitTestCase::setUp方法代码示例

本文整理汇总了PHP中CiviUnitTestCase::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP CiviUnitTestCase::setUp方法的具体用法?PHP CiviUnitTestCase::setUp怎么用?PHP CiviUnitTestCase::setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CiviUnitTestCase的用法示例。


在下文中一共展示了CiviUnitTestCase::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_individualId = $this->individualCreate();
     $this->_pledgeID = $this->pledgeCreate($this->_individualId);
     $this->_contributionID = $this->contributionCreate(array('contact_id' => $this->_individualId));
 }
开发者ID:konadave,项目名称:civicrm-core,代码行数:7,代码来源:PledgePaymentTest.php

示例2: setUp

 function setUp()
 {
     parent::setUp();
     $config = CRM_Core_Config::singleton();
     $this->oldConfigAndLogDir = $config->configAndLogDir;
     $config->configAndLogDir = $this->createTempDir('test-log-');
 }
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:7,代码来源:ErrorTest.php

示例3: setUp

 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();
 }
开发者ID:sushantpaste,项目名称:civibooking,代码行数:7,代码来源:PaymentTest.php

示例4: 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);
 }
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:7,代码来源:CountryTest.php

示例5: setUp

 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');
 }
开发者ID:rajeshrhino,项目名称:civicrm-core,代码行数:7,代码来源:ContributionRecurTest.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_contactId = $this->individualCreate();
     $event = $this->eventCreate();
     $this->_eventId = $event['id'];
 }
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:7,代码来源:ParticipantTest.php

示例7: setUp

 function setUp()
 {
     parent::setUp();
     $this->_individualId = $this->individualCreate();
     $this->_pledgeID = $this->pledgeCreate($this->_individualId);
     $this->_contributionID = $this->contributionCreate($this->_individualId);
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:7,代码来源:PledgePaymentTest.php

示例8: setUp

 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();
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:7,代码来源:SurveyTest.php

示例9: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->cleanupFiles();
     file_put_contents($this->tmpFile('mytest.txt'), 'This comes from a file');
 }
开发者ID:konadave,项目名称:civicrm-core,代码行数:7,代码来源:AttachmentTest.php

示例10: setUp

 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);
 }
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:7,代码来源:CampaignTest.php

示例11: setUp

 /**
  * Set up for tests.
  */
 public function setUp()
 {
     parent::setUp();
     $this->useTransaction(TRUE);
     $this->_apiversion = 3;
     $this->_contactID = $this->organizationCreate();
 }
开发者ID:rollox,项目名称:civicrm-core,代码行数:10,代码来源:MembershipTypeTest.php

示例12: setUp

 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);
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:7,代码来源:ParticipantStatusTypeTest.php

示例13: setUp

 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' => 'yourconscience@donate.com', 'receipt_from_name' => 'Ego Freud');
     $this->_priceSetParams = array('is_quick_config' => 1, 'extends' => 'CiviContribute', 'financial_type_id' => 'Donation', 'title' => 'my Page');
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:7,代码来源:ContributionPageTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->loadAllFixtures();
     CRM_Core_BAO_ConfigSetting::enableComponent('CiviCase');
     CRM_Core_BAO_ConfigSetting::enableComponent('CiviCampaign');
 }
开发者ID:joshgowans,项目名称:civicrm-core,代码行数:7,代码来源:PseudoConstantTest.php

示例15: setUp

 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);
 }
开发者ID:konadave,项目名称:civicrm-core,代码行数:25,代码来源:RelationshipTest.php


注:本文中的CiviUnitTestCase::setUp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。