From 4db17da0acde5b7ceedcb5c28d22131475fe18dd Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sat, 25 Oct 2014 03:22:07 -0400 Subject: [PATCH] INFRA-124 - CiviUnitTestCase - Reset the session-scoped user ID between tests --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 50ead2bc46..382d231058 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -325,6 +325,9 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * Common setup functions for all unit tests */ protected function setUp() { + $session = CRM_Core_Session::singleton(); + $session->set('userID', NULL); + CRM_Utils_Hook::singleton(TRUE); $this->errorScope = CRM_Core_TemporaryErrorScope::useException(); // REVERT // Use a temporary file for STDIN -- 2.25.1