View source
<?php
namespace Drupal\Tests\block\Kernel\Plugin\migrate\source\d6;
use Drupal\Tests\block\Kernel\Plugin\migrate\source\BlockTest;
class BlockTranslationTest extends BlockTest {
protected static $modules = [
'block',
];
public function providerSource() {
$tests = parent::providerSource();
$tests[0]['source_data']['i18n_blocks'] = [
[
'ibid' => 1,
'module' => 'block',
'delta' => '1',
'type' => 0,
'language' => 'fr',
],
[
'ibid' => 2,
'module' => 'block',
'delta' => '2',
'type' => 0,
'language' => 'zu',
],
];
$tests[0]['source_data']['variables'] = [
[
'name' => 'default_theme',
'value' => 's:7:"garland";',
],
];
$tests[0]['expected_data'] = [
[
'bid' => 1,
'module' => 'block',
'delta' => '1',
'title' => 'Test Title 01',
'ibid' => 1,
'type' => '0',
'language' => 'fr',
'default_theme' => 'Garland',
],
[
'bid' => 2,
'module' => 'block',
'delta' => '2',
'theme' => 'garland',
'title' => 'Test Title 02',
'ibid' => 2,
'type' => '0',
'language' => 'zu',
'default_theme' => 'Garland',
],
];
return $tests;
}
}