CRM-15011 - Fix inter-test-case leak
authorTim Otten <totten@civicrm.org>
Tue, 22 Jul 2014 07:47:53 +0000 (00:47 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 7 Aug 2014 19:08:01 +0000 (12:08 -0700)
tests/phpunit/CiviTest/CiviUnitTestCase.php

index d4a75d8ec44f29dc861b230e8618632f0a921f58..121b89cdb65b553611aad41cc8f5608bb641b095 100644 (file)
@@ -433,6 +433,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
    */
   protected function tearDown() {
     error_reporting(E_ALL & ~E_NOTICE);
+    $session = CRM_Core_Session::singleton();
+    $session->set('userID', NULL);
     $tablesToTruncate = array('civicrm_contact');
     $this->quickCleanup($tablesToTruncate);
     $this->cleanTempDirs();