From bee3e48d87d5d3d0e2a5fad47359f07053e714ef Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org> Date: Tue, 4 Nov 2014 14:47:10 +0000 Subject: [PATCH] =?UTF-8?q?Issue=20#2368081=20by=20G=C3=A1bor=20Hojtsy=20|?= =?UTF-8?q?=20andypost:=20Fixed=20Remove=20outdated=20@todo=20in=20hook=5F?= =?UTF-8?q?user=5Finstall().?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/src/Tests/Installer/InstallerTranslationTest.php | 6 ++++++ core/modules/user/user.install | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php b/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php index 1ab8e5a0fa4d..abecc2a16e17 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 @@ public function testInstaller() { $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 134c251b93c9..16978ca097ee 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(); } -- GitLab