Commit 8a016003 authored by alexpott's avatar alexpott
Browse files

Issue #1950684 by Berdir: Fixed Mock and protect ['user'] in DUTB tests.

parent 42bfe929
......@@ -867,6 +867,9 @@ protected function prepareEnvironment() {
// Ensure that the current session is not changed by the new environment.
// Run all tests as a anonymous user by default, web tests will replace that
// during the test set up.
$user = drupal_anonymous_user();
// Save and clean the shutdown callbacks array because it is static cached
// and will be changed by the test run. Otherwise it will contain callbacks
......@@ -775,10 +775,6 @@ protected function setUp() {
// Replace the global $user session with an anonymous user to resemble a
// regular installation.
$user = drupal_anonymous_user();
// Reset the static batch to remove Simpletest's batch operations.
$batch = &batch_get();
$batch = array();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment