X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fconfig_translation%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd6%2FMigrateUserProfileFieldInstanceTranslationTest.php;fp=web%2Fcore%2Fmodules%2Fconfig_translation%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd6%2FMigrateUserProfileFieldInstanceTranslationTest.php;h=01d5ec929d8aa8b5b2d0dc45afd43fc5ae9422fe;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=0000000000000000000000000000000000000000;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php b/web/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php new file mode 100644 index 000000000..01d5ec929 --- /dev/null +++ b/web/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php @@ -0,0 +1,65 @@ +executeMigrations([ + 'user_profile_field', + 'user_profile_field_instance', + 'd6_user_profile_field_instance_translation', + ]); + $language_manager = $this->container->get('language_manager'); + + $config_translation = $language_manager->getLanguageConfigOverride('fr', 'field.field.user.user.profile_love_migrations'); + $this->assertSame("J'aime les migrations", $config_translation->get('label')); + $this->assertSame("Si vous cochez cette case, vous aimez les migrations.", $config_translation->get('description')); + + $config_translation = $language_manager->getLanguageConfigOverride('fr', 'field.field.user.user.profile_color'); + $this->assertSame('fr - Favorite color', $config_translation->get('label')); + $this->assertSame('Inscrivez votre couleur préférée', $config_translation->get('description')); + + $config_translation = $language_manager->getLanguageConfigOverride('fr', 'field.field.user.user.profile_biography'); + $this->assertSame('fr - Biography', $config_translation->get('label')); + $this->assertSame('fr - Tell people a little bit about yourself', $config_translation->get('description')); + + $config_translation = $language_manager->getLanguageConfigOverride('fr', 'field.field.user.user.profile_sell_address'); + $this->assertSame('fr - Sell your email address?', $config_translation->get('label')); + $this->assertSame("fr - If you check this box, we'll sell your address to spammers to help line the pockets of our shareholders. Thanks!", $config_translation->get('description')); + + $config_translation = $language_manager->getLanguageConfigOverride('fr', 'field.field.user.user.profile_sold_to'); + $this->assertSame('fr - Sales Category', $config_translation->get('label')); + $this->assertSame("fr - Select the sales categories to which this user's address was sold.", $config_translation->get('description')); + $this->assertSame('fr - Pill spammers Fitness spammers Back\slash Forward/slash Dot.in.the.middle', $config_translation->get('options')); + + $config_translation = $language_manager->getLanguageConfigOverride('fr', 'field.field.user.user.profile_bands'); + $this->assertSame('Mes groupes préférés', $config_translation->get('label')); + $this->assertSame("fr - Enter your favorite bands. When you've saved your profile, you'll be able to find other people with the same favorites.", $config_translation->get('description')); + + $config_translation = $language_manager->getLanguageConfigOverride('fr', 'field.field.user.user.profile_birthdate'); + $this->assertSame('fr - Birthdate', $config_translation->get('label')); + $this->assertSame('fr - Enter your birth date and we\'ll send you a coupon.', $config_translation->get('description')); + + $config_translation = $language_manager->getLanguageConfigOverride('fr', 'field.field.user.user.profile_blog'); + $this->assertSame('fr - Blog', $config_translation->get('label')); + $this->assertSame('fr - Paste the full URL, including http://, of your personal blog.', $config_translation->get('description')); + } + +}