diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php b/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php index 1ab8e5a0fa4..abecc2a16e1 100644 --- a/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php +++ b/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php @@ -8,6 +8,7 @@ namespace Drupal\system\Tests\Installer; use Drupal\simpletest\InstallerTestBase; +use Drupal\user\Entity\User; /** * Selects German as the installation language and verifies the following page @@ -51,6 +52,11 @@ class InstallerTranslationTest extends InstallerTestBase { $this->assertUrl('user/1'); $this->assertResponse(200); + $account = User::load(0); + $this->assertEqual($account->language()->getId(), 'de', 'Anonymous user is German.'); + $account = User::load(1); + $this->assertEqual($account->language()->getId(), 'de', 'Administrator user is German.'); + // Ensure that we can enable basic_auth on a non-english site. $this->drupalPostForm('admin/modules', array('modules[Web services][basic_auth][enable]' => TRUE), t('Save configuration')); $this->assertResponse(200); diff --git a/core/modules/user/user.install b/core/modules/user/user.install index 134c251b93c..16978ca097e 100644 --- a/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -65,15 +65,11 @@ function user_schema() { */ function user_install() { $storage = \Drupal::entityManager()->getStorage('user'); - // @todo Rely on the default value for langcode in - // https://drupal.org/node/1966436 - $langcode = \Drupal::languageManager()->getDefaultLanguage()->getId(); // Insert a row for the anonymous user. $storage ->create(array( 'uid' => 0, 'status' => 0, - 'langcode' => $langcode, )) ->save(); @@ -85,7 +81,6 @@ function user_install() { 'name' => 'placeholder-for-uid-1', 'mail' => 'placeholder-for-uid-1', 'status' => TRUE, - 'langcode' => $langcode, )) ->save(); }