View source
<?php
namespace Drupal\Tests\block\Kernel\Migrate\d6;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
class MigrateBlockContentTranslationTest extends MigrateDrupal6TestBase {
protected static $modules = [
'book',
'block',
'comment',
'forum',
'views',
'block_content',
'config_translation',
'language',
'locale',
'path_alias',
'statistics',
'taxonomy',
];
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('block_content');
$this
->installConfig([
'block',
]);
$this
->installConfig([
'block_content',
]);
$this
->executeMigrations([
'language',
'd6_filter_format',
'block_content_type',
'block_content_body_field',
'd6_custom_block',
'd6_user_role',
'd6_block',
'd6_block_translation',
]);
block_rebuild();
}
public function testBlockContentTranslation() {
$language_manager = $this->container
->get('language_manager');
$config = $language_manager
->getLanguageConfigOverride('zu', 'block.block.user_1');
$this
->assertSame('zu - Navigation', $config
->get('settings.label'));
}
}