3 namespace Drupal\Tests\block_content\Kernel\Plugin\migrate\source\d7;
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
8 * Tests i18n custom block translations source plugin.
10 * @covers \Drupal\block_content\Plugin\migrate\source\d7\BlockCustomTranslation
12 * @group content_translation
14 class BlockCustomTranslationTest extends MigrateSqlSourceTestBase {
19 public static $modules = ['block_content', 'migrate_drupal'];
24 public function providerSource() {
28 $tests[0]['database']['block_custom'] = [
31 'body' => 'box 1 body',
32 'info' => 'box 1 title',
37 'body' => 'box 2 body',
38 'info' => 'box 2 title',
43 $tests[0]['database']['i18n_string'] = [
48 'property' => 'title',
70 $tests[0]['database']['locales_target'] = [
74 'translation' => 'fr - title translation',
82 'translation' => 'fr - body translation',
90 'translation' => 'zu - body translation',
97 $tests[0]['database']['system'] = [
101 'schema_version' => '7001',
106 $tests[0]['expected_results'] = [
109 'property' => 'title',
111 'translation' => 'fr - title translation',
114 'title_translated' => 'fr - title translation',
115 'body_translated' => 'fr - body translation',
116 'title' => 'box 1 title',
117 'body' => 'box 1 body',
121 'property' => 'body',
123 'translation' => 'fr - body translation',
126 'title_translated' => 'fr - title translation',
127 'body_translated' => 'fr - body translation',
128 'title' => 'box 1 title',
129 'body' => 'box 1 body',
133 'property' => 'body',
135 'translation' => 'zu - body translation',
138 'title_translated' => NULL,
139 'body_translated' => 'zu - body translation',
140 'title' => 'box 2 title',
141 'body' => 'box 2 body',