diff -u b/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php b/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php --- b/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php +++ b/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php @@ -12,7 +12,7 @@ * source_provider = "profile" * ) */ -class i18nProfileField extends DrupalSqlBase { +class I18nProfileField extends DrupalSqlBase { /** * {@inheritdoc} reverted: --- b/core/modules/config_translation/tests/src/Unit/Plugin/migrate/source/d6/I18nProfileFieldTest.php +++ /dev/null @@ -1,83 +0,0 @@ - 'test', - 'source' => [ - 'plugin' => 'd6_i18n_profile_field', - ], - ]; - - protected $databaseContents = [ - 'profile_fields' => [ - [ - 'fid' => 42, - 'title' => 'I love migrations', - 'name' => 'profile_love_migrations', - ], - ], - 'i18n_strings' => [ - [ - 'lid' => 10, - 'objectid' => 'profile_love_migrations', - 'type' => 'field', - 'property' => 'title', - ], - [ - 'lid' => 11, - 'objectid' => 'profile_love_migrations', - 'type' => 'field', - 'property' => 'explanation' - ] - ], - 'locales_target' => [ - [ - 'lid' => 10, - 'translation' => "J'aime les migrations.", - 'language' => 'fr', - ], - [ - 'lid' => 11, - 'translation' => 'Si vous cochez cette case, vous aimez les migrations.', - 'language' => 'fr', - ], - ], - ]; - - protected $expectedResults = [ - [ - 'property' => 'title', - 'translation' => "J'aime les migrations.", - 'language' => 'fr', - 'fid' => '42', - 'name' => 'profile_love_migrations', - ], - [ - 'property' => 'explanation', - 'translation' => 'Si vous cochez cette case, vous aimez les migrations.', - 'language' => 'fr', - 'fid' => '42', - 'name' => 'profile_love_migrations', - ], - ]; - - /** - * {@inheritdoc} - */ - protected function setUp() { - parent::setUp(); - } - -} only in patch2: unchanged: --- /dev/null +++ b/core/modules/config_translation/tests/src/Plugin/migrate/source/d6/I18nProfileFieldTest.php @@ -0,0 +1,82 @@ + [ + [ + 'fid' => 42, + 'title' => 'I love migrations', + 'name' => 'profile_love_migrations', + ], + ], + 'i18n_strings' => [ + [ + 'lid' => 10, + 'objectid' => 'profile_love_migrations', + 'type' => 'field', + 'property' => 'title', + ], + [ + 'lid' => 11, + 'objectid' => 'profile_love_migrations', + 'type' => 'field', + 'property' => 'explanation' + ] + ], + 'locales_target' => [ + [ + 'lid' => 10, + 'translation' => "J'aime les migrations.", + 'language' => 'fr', + ], + [ + 'lid' => 11, + 'translation' => 'Si vous cochez cette case, vous aimez les migrations.', + 'language' => 'fr', + ], + ], + ]; + + protected $expectedResults = [ + [ + 'property' => 'title', + 'translation' => "J'aime les migrations.", + 'language' => 'fr', + 'fid' => '42', + 'name' => 'profile_love_migrations', + ], + [ + 'property' => 'explanation', + 'translation' => 'Si vous cochez cette case, vous aimez les migrations.', + 'language' => 'fr', + 'fid' => '42', + 'name' => 'profile_love_migrations', + ], + ]; + + /** + * {@inheritdoc} + */ + public function providerSource() { + $test[0][0] = $this->databaseContents; + $test[0][1] = $this->expectedResults; + return $test; + } + +}