diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php index 1db4355cf30..a084ebf9afd 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php @@ -43,7 +43,7 @@ class EntityTranslationTest extends EntityLanguageTestBase { protected function _testEntityLanguageMethods($entity_type) { $entity = entity_create($entity_type, array( 'name' => 'test', - 'user_id' => $GLOBALS['user']->id(), + 'user_id' => $this->container->get('current_user')->id(), )); $this->assertEqual($entity->language()->id, Language::LANGCODE_NOT_SPECIFIED, format_string('%entity_type: Entity language not specified.', array('%entity_type' => $entity_type))); $this->assertFalse($entity->getTranslationLanguages(FALSE), format_string('%entity_type: No translations are available', array('%entity_type' => $entity_type)));