* (non-PHPdoc)
* @see CiviUnitTestCase::tearDown()
*/
- public function tearDown() {
+ public function tearDown(): void {
$tablesToTruncate = [
'civicrm_activity',
];
* (non-PHPdoc)
* @see CiviUnitTestCase::tearDown()
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->cleanUpAfterACLs();
$tablesToTruncate = [
'civicrm_contact',
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->useTransaction(TRUE);
CRM_Utils_Hook_UnitTests::singleton()->setHook('civicrm_apiWrappers', [$this, 'onApiWrappers']);
}
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown() {
- parent::tearDown();
- }
-
/**
* @param $apiWrappers
* @param $apiRequest
* Connect to the database, truncate the tables that will be used
* and redirect stdin to a temporary file
*/
- public function setUp() {
+ public function setUp(): void {
// Connect to the database
parent::setUp();
*
* This method is called after a test is executed.
*/
- public function tearDown() {
+ public function tearDown(): void {
$tablesToTruncate = [
'civicrm_contact',
'civicrm_activity',
];
}
- public function tearDown() {
+ public function tearDown(): void {
$this->locationTypeDelete($this->_locationTypeID);
$this->contactDelete($this->_contactID);
$this->quickCleanup(['civicrm_address', 'civicrm_relationship']);
file_put_contents($this->tmpFile('mytest.txt'), 'This comes from a file');
}
- protected function tearDown() {
+ protected function tearDown(): void {
parent::tearDown();
$this->cleanupFiles();
\Civi::reset();
$this->organizationCreate();
}
- public function tearDown() {
+ public function tearDown(): void {
parent::tearDown();
}
$this->settingsStack = new \Civi\Core\SettingsStack();
}
- public function tearDown() {
+ public function tearDown(): void {
$this->settingsStack->popAll();
parent::tearDown();
}
*
* This method is called after a test is executed.
*/
- public function tearDown() {
+ public function tearDown(): void {
parent::tearDown();
$this->quickCleanup(['civicrm_case_type', 'civicrm_uf_match']);
}
*
* @throws \CRM_Core_Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
foreach ($this->contactIds as $id) {
$this->callAPISuccess('contact', 'delete', ['id' => $id]);
}
*
* @throws \CRM_Core_Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanUpFinancialEntities();
$this->quickCleanup(['civicrm_uf_match'], TRUE);
$financialAccounts = $this->callAPISuccess('FinancialAccount', 'get', []);
$this->installApi();
}
- public function tearDown() {
+ public function tearDown(): void {
parent::tearDown();
CRM_Core_DAO::executeQuery('DROP TABLE civicrm_mailing_provider_data');
}
*
* @throws \CRM_Core_Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanup([
'civicrm_contact',
'civicrm_file',
parent::setUp();
}
- public function tearDown() {
+ public function tearDown(): void {
$tablesToTruncate = ['civicrm_custom_group', 'civicrm_custom_field'];
// true tells quickCleanup to drop any tables that might have been created in the test
$this->quickCleanup($tablesToTruncate, TRUE);
CRM_Core_BAO_CustomField::getTableColumnGroup($this->IndiStudentField['id'], TRUE);
}
- public function tearDown() {
+ public function tearDown(): void {
$tablesToTruncate = ['civicrm_contact', 'civicrm_cache'];
$this->quickCleanup($tablesToTruncate, TRUE);
}
}
- public function tearDown() {
+ public function tearDown(): void {
$tablesToTruncate = [
'civicrm_email',
'civicrm_custom_field',
}
}
- public function tearDown() {
+ public function tearDown(): void {
foreach ($this->eventIds as $eventId) {
$this->eventDelete($eventId);
}
Civi::settings()->set('ext_repo_url', $url);
}
- public function tearDown() {
+ public function tearDown(): void {
Civi::settings()->revert('ext_repo_url');
}
*
* @throws \Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanUpFinancialEntities();
$this->quickCleanup(['civicrm_uf_match']);
$this->disableFinancialACLs();
*
* @throws \Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
foreach ($this->ids as $entity => $entities) {
foreach ($entities as $id) {
$this->callAPISuccess($entity, 'delete', ['id' => $id]);
*
* @throws \Exception
*/
- protected function tearDown() {
+ protected function tearDown(): void {
$this->quickCleanup(
[
'civicrm_group',
/**
* Set up for tests.
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_groupID = $this->groupCreate();
$config = CRM_Core_Config::singleton();
*
* @throws \Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
CRM_Utils_Hook::singleton()->reset();
$config = CRM_Core_Config::singleton();
unset($config->userPermissionClass->permissions);
/**
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->_mut->stop();
CRM_Utils_Hook::singleton()->reset();
$this->cleanupMailingTest();
$this->_tomorrow = date('Y-m-d', time() + 60 * 60 * 24);
}
- public function tearDown() {
+ public function tearDown(): void {
parent::tearDown();
// For each case, the `old` membershipt type must start as
*
* @throws \CRM_Core_Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanup(['civicrm_contact'], TRUE);
parent::tearDown();
}
/**
* Clean up log tables.
*/
- protected function tearDown() {
+ protected function tearDown(): void {
$this->quickCleanup(['civicrm_email', 'civicrm_address']);
parent::tearDown();
$this->callAPISuccess('Setting', 'create', ['logging' => FALSE]);
$this->_contact = $this->callAPISuccess("contact", "create", $params);
}
- public function tearDown() {
+ public function tearDown(): void {
$this->callAPISuccess("contact", "delete", ['id' => $this->_contact['id']]);
parent::tearDown();
}
]);
}
- public function tearDown() {
+ public function tearDown(): void {
// DGW
CRM_Mailing_BAO_MailingJob::$mailsProcessed = 0;
parent::tearDown();
*
* @throws \CRM_Core_Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->membershipStatusDelete($this->_membershipStatusID);
$this->membershipTypeDelete(['id' => $this->_membershipTypeID]);
$this->contactDelete($this->_contactID);
*
* @throws \Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanUpFinancialEntities();
$this->quickCleanup(['civicrm_uf_match'], TRUE);
$this->contactDelete($this->_contactID);
];
}
- public function tearDown() {
+ public function tearDown(): void {
parent::tearDown();
unset(CRM_Core_Config::singleton()->userPermissionClass->permissions);
}
$this->useTransaction(TRUE);
}
- public function tearDown() {
+ public function tearDown(): void {
CRM_Core_I18n_Schema::makeSinglelingual('en_US');
parent::tearDown();
}
*
* @throws \CRM_Core_Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanUpFinancialEntities();
$this->quickCleanup(['civicrm_uf_match']);
}
];
}
- public function tearDown() {
+ public function tearDown(): void {
$this->eventDelete($this->_eventID);
$tablesToTruncate = [
'civicrm_custom_group',
$this->useTransaction(TRUE);
}
- // function tearDown() {
+ // function tearDown(): void {
//
// $tablesToTruncate = array(
// 'civicrm_payment_processor_type',
*
* @throws \Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanUpFinancialEntities();
$this->quickCleanup(['civicrm_uf_match']);
unset(CRM_Core_Config::singleton()->userPermissionClass->permissions);
* Clean up after function.
* @throws \CRM_Core_Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$tablesToTruncate = [
'civicrm_contribution',
'civicrm_contact',
];
}
- public function tearDown() {
+ public function tearDown(): void {
$this->contactDelete($this->_individualId);
}
*
* @throws \CRM_Core_Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$tablesToTruncate = [
'civicrm_contact',
'civicrm_contribution',
*
* @throws \Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$tablesToTruncate = [
'civicrm_contact',
'civicrm_contribution',
*
* @throws \Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanup([
'civicrm_contact',
*
* @throws \Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->contactDelete($this->_cId_a);
$this->contactDelete($this->_cId_a_2);
$this->contactDelete($this->_cId_b);
$this->_cId_b = $this->organizationCreate();
}
- public function tearDown() {
+ public function tearDown(): void {
$tablesToTruncate = [
'civicrm_contact',
*
* @throws \Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanUpFinancialEntities();
$this->quickCleanup(['civicrm_group', 'civicrm_saved_search', 'civicrm_group_contact', 'civicrm_group_contact_cache', 'civicrm_group'], TRUE);
parent::tearDown();
$this->hookClass = CRM_Utils_Hook::singleton();
}
- public function tearDown() {
+ public function tearDown(): void {
CRM_Utils_Hook::singleton()->reset();
parent::tearDown();
$this->callAPISuccess('system', 'flush', []);
$this->deletableTestObjects = [];
}
- public function tearDown() {
+ public function tearDown(): void {
foreach ($this->deletableTestObjects as $entityName => $entities) {
foreach ($entities as $entityID) {
CRM_Core_DAO::deleteTestObjects($entityName, ['id' => $entityID]);
/**
* Cleanup after function.
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanUpFinancialEntities();
parent::tearDown();
}
*
* @throws \Exception
*/
- public function tearDown() {
+ public function tearDown(): void {
$this->quickCleanup(
[
'civicrm_group',
];
}
- public function tearDown() {
+ public function tearDown(): void {
// Truncate the tables
$this->quickCleanup(
[
$this->loadXMLDataSet(dirname(__FILE__) . '/dataset/uf_group_test.xml');
}
- public function tearDown() {
+ public function tearDown(): void {
// Truncate the tables
$this->quickCleanup(
[
];
}
- public function tearDown() {
+ public function tearDown(): void {
// Truncate the tables
$this->quickCleanup(
[