From 6fe119af61c81aaf2ce327118ebbe76ff1d4896e Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 14 Dec 2022 22:58:30 -0800 Subject: [PATCH] CiviUnitTestCase - Remove unused property $populateOnce The property is initialized to FALSE. It seems that the idea was to let some classes override this, but it is never used. --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 4c438deef8..feec9a0a23 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -110,20 +110,6 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase { */ protected $tempDirs; - /** - * @var bool - * populateOnce allows to skip db resets in setUp - * - * WARNING! USE WITH CAUTION - IT'LL RENDER DATA DEPENDENCIES - * BETWEEN TESTS WHEN RUN IN SUITE. SUITABLE FOR LOCAL, LIMITED - * "CHECK RUNS" ONLY! - * - * IF POSSIBLE, USE $this->DBResetRequired = FALSE IN YOUR TEST CASE! - * - * @see http://forum.civicrm.org/index.php/topic,18065.0.html - */ - public static $populateOnce = FALSE; - /** * DBResetRequired allows skipping DB reset * in specific test case. If you still need @@ -314,10 +300,9 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase { $dbreset = $object->DBResetRequired; } - if (self::$populateOnce || !$dbreset) { + if (!$dbreset) { return FALSE; } - self::$populateOnce = NULL; Civi\Test::data()->populate(); -- 2.25.1