projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b98b56
)
INFRA-124 - CiviUnitTestCase - Reset the session-scoped user ID between tests
author
Tim Otten
<totten@civicrm.org>
Sat, 25 Oct 2014 07:22:07 +0000
(
03:22
-0400)
committer
Tim Otten
<totten@civicrm.org>
Sat, 25 Oct 2014 07:22:07 +0000
(
03:22
-0400)
tests/phpunit/CiviTest/CiviUnitTestCase.php
patch
|
blob
|
blame
|
history
diff --git
a/tests/phpunit/CiviTest/CiviUnitTestCase.php
b/tests/phpunit/CiviTest/CiviUnitTestCase.php
index 50ead2bc4632d543dfd6bc28fff4e17d7eb8f9f9..382d2310587d9bb28a2c18e1907894b5fd9d0848 100644
(file)
--- 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