protected $formName = 'mockPage';
- public static function setUpBeforeClass() {
+ public static function setUpBeforeClass(): void {
\Civi\Test::e2e()
->install(['org.civicrm.afform', 'org.civicrm.afform-mock'])
->apply();
->apply();
}
- public function setUp() {
- parent::setUp();
- }
-
- public function tearDown() {
- parent::tearDown();
- }
-
/**
* Test running a searchDisplay with various filters.
*/
}
}
- public static function tearDownAfterClass() {
+ public static function tearDownAfterClass(): void {
CRM_Core_DAO::executeQuery('DROP TABLE IF EXISTS civicrm_fts_example');
parent::tearDownAfterClass();
}
/**
* In the first test, we make make testDummy1. He exists.
*/
- public function testDummy1() {
+ public function testDummy1(): void {
$this->assertTrue(is_numeric(self::$contactIds['testDummy1']) && self::$contactIds['testDummy1'] > 0);
// Still inside transaction. Data exists.
* We previously made testDummy1, but he's been lost (rolled-back).
* However, testDummy2 now exists.
*/
- public function testDummy2() {
+ public function testDummy2(): void {
$this->assertTrue(is_numeric(self::$contactIds['testDummy1']) && self::$contactIds['testDummy1'] > 0);
$this->assertTrue(is_numeric(self::$contactIds['testDummy2']) && self::$contactIds['testDummy2'] > 0);
*
* @throws \Exception
*/
- public static function tearDownAfterClass() {
+ public static function tearDownAfterClass(): void {
if (!is_numeric(self::$contactIds['testDummy1'])) {
throw new \Exception("Uh oh! The static \$contactIds does not include testDummy1! Did the test fail to execute?");
}
*/
class CiviEndToEndTestCase extends PHPUnit\Framework\TestCase implements \Civi\Test\EndToEndInterface {
- public static function setUpBeforeClass() {
+ public static function setUpBeforeClass(): void {
CRM_Core_Config::singleton(1, 1);
CRM_Utils_System::loadBootStrap(array(
'name' => $GLOBALS['_CV']['ADMIN_USER'],
return TRUE;
}
- public static function setUpBeforeClass() {
+ public static function setUpBeforeClass(): void {
static::_populateDB(TRUE);
// also set this global hack
const MAX_KEY = 255;
- public static function setUpBeforeClass() {
+ public static function setUpBeforeClass(): void {
CRM_Core_Config::singleton(1, 1);
CRM_Utils_System::loadBootStrap(array(
'name' => $GLOBALS['_CV']['ADMIN_USER'],
//$this->assertEquals(12, $contribution['values'][1]['api.ContributionRecur.getsingle']['frequency_interval']);
}
- public static function setUpBeforeClass() {
- // put stuff here that should happen before all tests in this unit
- }
-
/**
* Create a payment processor instance.
*
$this->assertEquals(16, $result['values']['is_quick_config']['type']);
}
- public static function setUpBeforeClass() {
- // put stuff here that should happen before all tests in this unit
- }
-
- public static function tearDownAfterClass() {
+ public static function tearDownAfterClass(): void {
$tablesToTruncate = [
'civicrm_contact',
'civicrm_contribution',