本文整理汇总了PHP中CiviUnitTestCase::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP CiviUnitTestCase::tearDown方法的具体用法?PHP CiviUnitTestCase::tearDown怎么用?PHP CiviUnitTestCase::tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CiviUnitTestCase
的用法示例。
在下文中一共展示了CiviUnitTestCase::tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
public function tearDown()
{
parent::tearDown();
if ($this->file) {
unlink($this->file);
}
}
示例2: tearDown
public function tearDown()
{
global $civicrm_setting;
$civicrm_setting = $this->origSetting;
CRM_Utils_Cache::singleton()->flush();
parent::tearDown();
}
示例3: tearDown
function tearDown()
{
if ($this->file) {
unlink($this->file);
}
parent::tearDown();
}
示例4: tearDown
public function tearDown()
{
CRM_Utils_Hook::singleton()->reset();
parent::tearDown();
$this->callAPISuccess('system', 'flush', array());
$this->quickCleanup(array('civicrm_domain'));
}
示例5: tearDown
function tearDown()
{
parent::tearDown();
CRM_Core_DAO::singleValueQuery('DELETE FROM civicrm_managed');
CRM_Core_DAO::singleValueQuery('DELETE FROM civicrm_option_value WHERE name like "CRM_Example_%"');
\Civi\Core\Container::singleton(TRUE);
}
示例6: tearDown
function tearDown()
{
$this->quickCleanup(array('civicrm_job', 'civicrm_action_log', 'civicrm_action_schedule'));
$this->quickCleanUpFinancialEntities();
CRM_Utils_Hook::singleton()->reset();
parent::tearDown();
}
示例7: tearDown
public function tearDown()
{
parent::tearDown();
// The membershipType create breaks transactions so this extra cleanup is needed.
$this->membershipTypeDelete(array('id' => $this->membershipTypeID));
$this->cleanUpSetUpIDs();
}
示例8: tearDown
/**
*
*/
function tearDown()
{
$this->_mut->stop();
$this->quickCleanup(array('civicrm_mailing', 'civicrm_mailing_job', 'civicrm_contact'));
CRM_Utils_Hook::singleton()->reset();
parent::tearDown();
}
示例9: 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"');
}
示例10: tearDown
public function tearDown()
{
CRM_Core_I18n_Schema::makeSinglelingual('en_US');
$logging = new CRM_Logging_Schema();
$logging->dropAllLogTables();
parent::tearDown();
}
示例11: tearDown
function tearDown()
{
// TODO Figure out how to automatically drop all temporary tables.
// Note that MySQL doesn't provide a way to list them, so we would need
// to keep track ourselves (eg CRM_Core_TemporaryTableManager) or reset
// the MySQL connection between test runs.
parent::tearDown();
}
示例12: tearDown
/**
* Restore the DB for the next test.
*
* @throws \Exception
*/
public function tearDown()
{
$this->callAPISuccess('Setting', 'create', array('includeOrderByClause' => TRUE));
// truncate a few tables
$tablesToTruncate = array('civicrm_email', 'civicrm_contribution', 'civicrm_line_item', 'civicrm_website', 'civicrm_relationship', 'civicrm_uf_match', 'civicrm_phone', 'civicrm_address', 'civicrm_acl_contact_cache', 'civicrm_activity_contact', 'civicrm_activity');
$this->quickCleanup($tablesToTruncate, TRUE);
parent::tearDown();
}
示例13: tearDown
public function tearDown()
{
CRM_Utils_Hook::singleton()->reset();
$this->quickCleanup(array('civicrm_group'));
$config = CRM_Core_Config::singleton();
unset($config->userPermissionClass->permissions);
parent::tearDown();
}
示例14: tearDown
/**
* Clean up log tables.
*/
protected function tearDown()
{
$this->quickCleanup(array('civicrm_email'));
parent::tearDown();
$this->callAPISuccess('Setting', 'create', array('logging' => FALSE));
$schema = new CRM_Logging_Schema();
$schema->dropAllLogTables();
CRM_Core_DAO::executeQuery("DELETE FROM civicrm_setting WHERE name LIKE 'logg%'");
}
示例15: tearDown
public function tearDown()
{
// May or may not cleanup well if there's a bug in the indexer.
// This is better than nothing -- and better than duplicating the
// cleanup logic.
$idx = new CRM_Core_InnoDBIndexer(FALSE, array());
$idx->fixSchemaDifferences();
parent::tearDown();
}