From cbe415751e1dbdda17f6bceccc55c8a5e8afef3e Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 22 Mar 2019 13:04:40 +1300 Subject: [PATCH] Reset entire session object between tests> #13553 has been struggling with bugs that seem to be leakage of the session object between tests - this seems like a good place to flush it --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index c12a2dd92e..08762b0ca6 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -413,8 +413,7 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { if ($this->hookClass) { $this->hookClass->reset(); } - $session = CRM_Core_Session::singleton(); - $session->set('userID', NULL); + CRM_Core_Session::singleton()->reset(1); if ($this->tx) { $this->tx->rollback()->commit(); -- 2.25.1