本文整理汇总了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));
}
示例2: setUp
function setUp()
{
parent::setUp();
$config = CRM_Core_Config::singleton();
$this->oldConfigAndLogDir = $config->configAndLogDir;
$config->configAndLogDir = $this->createTempDir('test-log-');
}
示例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();
}
示例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);
}
示例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');
}
示例6: setUp
public function setUp()
{
parent::setUp();
$this->_contactId = $this->individualCreate();
$event = $this->eventCreate();
$this->_eventId = $event['id'];
}
示例7: setUp
function setUp()
{
parent::setUp();
$this->_individualId = $this->individualCreate();
$this->_pledgeID = $this->pledgeCreate($this->_individualId);
$this->_contributionID = $this->contributionCreate($this->_individualId);
}
示例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();
}
示例9: setUp
protected function setUp()
{
parent::setUp();
$this->useTransaction(TRUE);
$this->cleanupFiles();
file_put_contents($this->tmpFile('mytest.txt'), 'This comes from a file');
}
示例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);
}
示例11: setUp
/**
* Set up for tests.
*/
public function setUp()
{
parent::setUp();
$this->useTransaction(TRUE);
$this->_apiversion = 3;
$this->_contactID = $this->organizationCreate();
}
示例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);
}
示例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');
}
示例14: setUp
public function setUp()
{
parent::setUp();
$this->loadAllFixtures();
CRM_Core_BAO_ConfigSetting::enableComponent('CiviCase');
CRM_Core_BAO_ConfigSetting::enableComponent('CiviCampaign');
}
示例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);
}