本文整理汇总了PHP中CiviUnitTestCase类的典型用法代码示例。如果您正苦于以下问题:PHP CiviUnitTestCase类的具体用法?PHP CiviUnitTestCase怎么用?PHP CiviUnitTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CiviUnitTestCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: setUp
function setUp()
{
parent::setUp();
$this->_groupID = $this->groupCreate();
$this->_email = '[email protected]';
$this->_params = array('subject' => 'maild', 'body_text' => 'bdkfhdskfhduew', 'name' => 'mailing name', 'created_id' => 1);
}
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:7,代码来源:MailingTest.php
示例2: setUp
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);
}
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:7,代码来源:StatusPreferenceTest.php
示例3: tearDown
public function tearDown()
{
parent::tearDown();
if ($this->file) {
unlink($this->file);
}
}
开发者ID:sdekok,项目名称:civicrm-core,代码行数:7,代码来源:ZipTest.php
示例4: setUp
public function setUp()
{
parent::setUp();
$this->quickCleanup(array('civicrm_contact', 'civicrm_activity'));
$this->callbackLog = array();
$this->cids = array();
}
开发者ID:konadave,项目名称:civicrm-core,代码行数:7,代码来源:TransactionTest.php
示例5: setUp
public function setUp()
{
parent::setUp();
$this->useTransaction(TRUE);
$this->_entity = 'mapping';
$this->params = array('name' => 'Mapping name', 'description' => 'Mapping description', 'mapping_type_id' => 7);
}
开发者ID:sdekok,项目名称:civicrm-core,代码行数:7,代码来源:MappingTest.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
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
示例9: 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
示例10: tearDown
function tearDown()
{
if ($this->file) {
unlink($this->file);
}
parent::tearDown();
}
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:7,代码来源:InfoTest.php
示例11: 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
示例12: 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
示例13: tearDown
function tearDown()
{
$this->quickCleanup(array('civicrm_job', 'civicrm_action_log', 'civicrm_action_schedule'));
$this->quickCleanUpFinancialEntities();
CRM_Utils_Hook::singleton()->reset();
parent::tearDown();
}
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:7,代码来源:JobTest.php
示例14: 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
示例15: setUp
/**
* Setup function.
*/
public function setUp()
{
parent::setUp();
$this->_apiversion = 3;
$this->_individualId = $this->individualCreate();
CRM_Core_Config::singleton()->userPermissionClass->permissions = array();
}
开发者ID:nielosz,项目名称:civicrm-core,代码行数:10,代码来源:PaymentTest.php
示例16: 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
示例17: 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
示例18: setUp
public function setUp()
{
parent::setUp();
$this->useTransaction(TRUE);
$this->tag = $this->tagCreate();
$this->ids['tag'][] = $this->tagID = $this->tag['id'];
}
开发者ID:sdekok,项目名称:civicrm-core,代码行数:7,代码来源:TagTest.php
示例19: setUp
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);
}
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:28,代码来源:ContactSearchTest.php
示例20: tearDown
public function tearDown()
{
parent::tearDown();
$this->system = NULL;
$this->quickCleanup(array('civicrm_payment_processor'));
CRM_Core_DAO::executeQuery('DELETE FROM civicrm_payment_processor_type WHERE class_name = "test.extension.manager.paymenttest"');
}
开发者ID:konadave,项目名称:civicrm-core,代码行数:7,代码来源:PaymentTest.php
注:本文中的CiviUnitTestCase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论