Issue #1950684 by Berdir: Fixed Mock and protect ['user'] in DUTB tests.
parent
42bfe9293d
commit
8a0160034a
|
@ -867,6 +867,9 @@ abstract class TestBase {
|
|||
|
||||
// Ensure that the current session is not changed by the new environment.
|
||||
drupal_save_session(FALSE);
|
||||
// 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 @@ abstract class WebTestBase extends TestBase {
|
|||
),
|
||||
);
|
||||
|
||||
// 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();
|
||||
|
|
Loading…
Reference in New Issue