use CRMTraits_Custom_CustomDataTrait;
- /**
- * Sets up the fixture, for example, opens a network connection.
- *
- * This method is called before a test is executed.
- */
- protected function setUp() {
- parent::setUp();
- }
-
/**
* Tears down the fixture, for example, closes a network connection.
*
*/
protected $deleted_contact_id;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->deleted_contact_id = $this->individualCreate([
'first_name' => 'Delete',
*
* @throws \CRM_Core_Exception
*/
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->_contactIds = [
$this->individualCreate(['first_name' => 'Antonia', 'last_name' => 'D`souza']),
protected $_contactIds = NULL;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->_contactIds = [
$this->individualCreate(['first_name' => 'Antonia', 'last_name' => 'D`souza']),
protected $_contactIds;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->_contactIds = [
$this->individualCreate(['first_name' => 'Antonia', 'last_name' => 'D`souza']),
*
* @throws \CRM_Core_Exception
*/
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$mobile_type_id = CRM_Core_PseudoConstant::getKey('CRM_Core_DAO_Phone', 'phone_type_id', 'Mobile');
$phone_type_id = CRM_Core_PseudoConstant::getKey('CRM_Core_DAO_Phone', 'phone_type_id', 'Phone');
*/
protected $entity = 'Contact';
- /**
- * Setup function.
- */
- public function setUp() {
- parent::setUp();
- }
-
/**
* Tear down after test.
*
*/
protected $originalRequest = [];
- public function setUp() {
+ public function setUp(): void {
$this->useTransaction(TRUE);
parent::setUp();
$this->originalRequest = $_REQUEST;
*/
class CRM_Contact_Page_DedupeExceptionTest extends CiviUnitTestCase {
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- protected function setUp() {
- parent::setUp();
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- *
- * This method is called after a test is executed.
- */
- protected function tearDown(): void {
- parent::tearDown();
- }
-
public function testGetDedupeExceptions() {
$contact1 = $this->individualCreate();
$contact2 = $this->individualCreate();
*/
class CRM_Contact_Page_View_NoteTest extends CiviUnitTestCase {
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- protected function setUp() {
- parent::setUp();
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- *
- * This method is called after a test is executed.
- */
- protected function tearDown(): void {
- parent::tearDown();
- }
-
public function testNoContactIdNote() {
$contactId = $this->individualCreate();
foreach ([1, 2, 3, 4, 5] as $noteID) {
/**
* Prepare for test
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->contactID = $this->createLoggedInUser();
$this->listenForPageContent();
*/
class CRM_Contact_Page_View_UserDashboard_GroupContactTest extends CiviUnitTestCase {
- /**
- * Sets up the fixture, for example, opens a network connection.
- * This method is called before a test is executed.
- */
- protected function setUp() {
- parent::setUp();
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- *
- * This method is called after a test is executed.
- */
- protected function tearDown(): void {
- parent::tearDown();
- }
-
/**
* Test that the list of the contact's joined groups, on the Contact Dashboard,
* contains the correct groups.
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->createLoggedInUser();
*/
class CRM_Contribute_Form_ContributionPageTranslationTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_financialTypeID = 1;
$this->enableMultilingual();
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
- public function setUp() {
+ public function setUp(): void {
$this->_apiversion = 3;
parent::setUp();
$this->_userId = $this->createLoggedInUser();
protected $_individual;
protected $_tablesToTruncate = ['civicrm_contribution', 'civicrm_line_item'];
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_individual = $this->individualCreate();
$this->ids['Contact']['contactID1'] = $this->individualCreate([], 1);
protected $_params = [];
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_fields = ['amount', 'sct_label'];
use CRMTraits_Custom_CustomDataTrait;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->quickCleanup(['civicrm_contact', 'civicrm_address']);
*/
class CRM_Core_BAO_CustomGroupTest extends CiviUnitTestCase {
- public function setUp() {
- parent::setUp();
- }
-
/**
* Test getTree().
*/
*/
class CRM_Core_BAO_CustomValueTableMultipleTest extends CiviUnitTestCase {
- public function setUp() {
- parent::setUp();
- }
-
- public function testCustomGroupMultipleSingle() {
+ public function testCustomGroupMultipleSingle(): void {
$contactID = $this->individualCreate();
$customGroup = $this->customGroupCreate(['is_multiple' => 1]);
$fields = [
*/
class CRM_Core_BAO_CustomValueTableSetGetTest extends CiviUnitTestCase {
- public function setUp() {
- parent::setUp();
- }
-
/**
* Test setValues() and GetValues() methods with custom Date field
*
*/
class CRM_Core_BAO_CustomValueTableTest extends CiviUnitTestCase {
- public function setUp() {
- parent::setUp();
- }
-
/**
* Test store function for country.
*/
*
* @throws \CRM_Core_Exception
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->quickCleanup(['civicrm_contact', 'civicrm_email']);
}
*/
class CRM_Core_BAO_FinancialTrxnTest extends CiviUnitTestCase {
- public function setUp() {
- parent::setUp();
- }
-
/**
* Check method create().
*
*/
class CRM_Core_BAO_IMTest extends CiviUnitTestCase {
- public function setUp() {
- parent::setUp();
- }
-
/**
* Create() method (create and update modes)
*/
*/
class CRM_Core_BAO_LocationTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->quickCleanup([
*
* Here we ensure we are starting from a default report navigation.
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
CRM_Core_BAO_Navigation::rebuildReportsNavigation(CRM_Core_Config::domainID());
}
/**
* Test setup for every test.
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->useTransaction(TRUE);
}
/**
* Test setup for every test.
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->useTransaction(TRUE);
}
*/
class CRM_Core_BAO_PhoneTest extends CiviUnitTestCase {
- public function setUp() {
- parent::setUp();
- }
-
/**
* Add() method (create and update modes)
*/
*/
class CRM_Core_BAO_PreferencesTest extends CiviUnitTestCase {
- public function setUp() {
- parent::setUp();
- }
-
public function testValueOptions() {
$addressOptions = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
*/
private $origSetting;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
global $civicrm_setting;
$this->origSetting = $civicrm_setting;
*/
class CRM_Core_BAO_UFFieldTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->quickCleanup(['civicrm_uf_group', 'civicrm_uf_field']);
return self::$webResponses;
}
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->cache = new CRM_Utils_Cache_Arraycache([]);
self::initWebResponses();
*/
public $calls;
- public function setUp() {
+ public function setUp(): void {
$this->calls = [
'civicrm_alterMailer' => 0,
'send' => 0,
*/
class CRM_Core_ErrorTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$config = CRM_Core_Config::singleton();
$this->oldConfigAndLogDir = $config->configAndLogDir;
*/
public $targetField;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
CRM_Utils_Hook::singleton()->setHook('civicrm_fieldOptions', [$this, 'hook_civicrm_fieldOptions']);
}
return $tables;
}
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
}
*/
class CRM_Core_JobManagerTest extends CiviUnitTestCase {
- public function setUp() {
- parent::setUp();
- }
-
public function testHookCron() {
$hook = $this->getMockBuilder(stdClass::class)
->setMethods(['civicrm_cron'])
protected $fixtures;
- public function setUp() {
+ public function setUp(): void {
$this->useTransaction(TRUE);
parent::setUp();
$this->modules = [
/**
* Test setup for every test.
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
}
/**
* Set up the list of pages to evaluate by going through the menu.
*/
- public function setUp() {
+ public function setUp(): void {
// Get all of the menu items in CiviCRM.
$items = CRM_Core_Menu::items(TRUE);
// Check if they extend the class we care about; test if needed.
*
* @throws \CRM_Core_Exception
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_paymentProcessorID = $this->paymentProcessorAuthorizeNetCreate(['is_test' => 0]);
$this->_contactID = $this->individualCreate();
use CRM_Core_Payment_AuthorizeNetTrait;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_paymentProcessorID = $this->paymentProcessorAuthorizeNetCreate();
/**
* Setup function.
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_processorId = $this->paymentProcessorAuthorizeNetCreate(['is_test' => 0]);
$this->input = $this->ids = $this->objects = [];
/**
* Set up function.
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_paymentProcessorID = $this->paymentProcessorCreate(['is_test' => 0]);
$this->_contactID = $this->individualCreate();
/**
* @throws \CiviCRM_API3_Exception
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->createPaypalProProcessor();
/**
* @throws \CiviCRM_API3_Exception
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$processorID = $this->processorCreate([
'payment_processor_type_id' => 'PayPal_Standard',
*/
class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->loadAllFixtures();
*/
class CRM_Core_RegionTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
// Templates injected into regions should normally be file names, but for unit-testing it's handy to use "string:" notation
*/
class CRM_Core_SessionTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
CRM_Core_Smarty::singleton()->clearTemplateVars();
}
*/
class CRM_Core_Smarty_plugins_CrmMoneyTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
require_once 'CRM/Core/Smarty.php';
*/
class CRM_Core_Smarty_plugins_CrmScopeTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
require_once 'CRM/Core/Smarty.php';
*/
private $cids;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->quickCleanup(['civicrm_contact', 'civicrm_activity']);
$this->callbackLog = [];
*/
class CRM_Custom_Form_FieldTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
}
*
* @throws \CRM_Core_Exception
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->contactID = $this->individualCreate();
$event = $this->eventCreate();
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_contactId = $this->individualCreate();
$event = $this->eventCreate(['is_monetary' => 1]);
use CRMTraits_ACL_PermissionTrait;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_contactId = $this->createLoggedInUser();
$this->createOwnEvent();
*/
class CRM_Event_BAO_ParticipantTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->_contactId = $this->individualCreate();
$event = $this->eventCreate();
*/
class CRM_Event_BAO_QueryTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
}
*/
protected $fromEmailAddressOptions = [];
- public function setUp() {
+ public function setUp(): void {
$this->useTransaction(TRUE);
parent::setUp();
}
use CRMTraits_Profile_ProfileTrait;
- public function setUp() {
+ public function setUp(): void {
$this->useTransaction(TRUE);
parent::setUp();
}
*/
class CRM_Event_Form_SearchTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->individualID = $this->individualCreate();
$this->event = $this->eventCreate();
*/
class CRM_Extension_InfoTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->file = NULL;
}
*/
class CRM_Extension_Manager_PaymentTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
if (class_exists('test_extension_manager_paymenttest')) {
test_extension_manager_paymenttest::$counts = [];
*/
class CRM_Extension_Manager_SearchTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
//if (class_exists('test_extension_manager_searchtest')) {
// test_extension_manager_searchtest::$counts = array();
*/
class CRM_Financial_BAO_FinancialAccountTest extends CiviUnitTestCase {
- public function setUp() {
+ public function setUp(): void {
$this->useTransaction(TRUE);
parent::setUp();
$this->organizationCreate();
*/
class CRM_Logging_LoggingTest extends CiviUnitTestCase {
- public function setUp() {
- parent::setUp();
- }
-
public function tearDown(): void {
CRM_Core_I18n_Schema::makeSinglelingual('en_US');
$logging = new CRM_Logging_Schema();