Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Nov 2014 at 09:19 UTC
Updated:
18 Nov 2014 at 14:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gábor hojtsyI don't think the default language will be applied so far as we use the storage directly instead of the entity API? Let's see what happens :D
Comment #2
andypostIt works!
Comment #3
andypostDo we need test for that?
Manually tested install with ru language - it works
Comment #4
alexpottYep we could add an assertion to InstallerTranslationTest
Comment #5
alexpottSo there is a KernelTestBase test for this - see
UserInstallTest. But I don't trust it to properly test the integration of the installer, entity system and language so early during an install. So lets add an assertion to InstallerTranslationTest for this too.Comment #6
gábor hojtsyBased on git blame, #2148071: Cannot install in foreign language (Undefined index: und in ContentEntityBase->language()) added the langcode to user_install(). It did add a test to ensure the warning seen before did not appear anymore but no specific test as to what langcode the user was created in. We can add asserts to existing tests to ensure the user got created with a good langcode. InstallerTranslationTest looks good for this.
Comment #7
gábor hojtsyNote also that UserInstallTest tests this with English and ensures both users get created with the site default language (English in that test). Here is a little update to InstallerTranslationTest to test that those get created in German.
Comment #8
gábor hojtsyLooks good? :)
Comment #9
andypostexactly!
Comment #10
gábor hojtsyComment #11
catchCommitted/pushed to 8.0.x, thanks!
Comment #13
gábor hojtsySuperb, thanks!