diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/FieldAccessTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/FieldAccessTest.php index fdcd244..7945b7c 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/FieldAccessTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/FieldAccessTest.php @@ -22,8 +22,10 @@ class FieldAccessTest extends DrupalUnitTestBase { public static $modules = array('entity_test', 'field', 'field_sql_storage', 'system', 'text', 'user'); /** - * Holds the currently active global user ID that gets replaced during the - * test. + * Holds the currently active global user ID that initiated the test run. + * + * The user ID gets replaced during the test and needs to be kept here so that + * it can be restored at the end of the test run. * * @var int */ @@ -43,6 +45,7 @@ protected function setUp() { $this->installSchema('field', array('field_config', 'field_config_instance')); // Register entity_test text field. entity_test_install(); + // The global user account refers to the user that initiated this test run. // Mask the global user as anonymous to avoid any user account loading. global $user; $this->activeUid = $user->uid;