class MigrateSystemSiteTranslationTest
Same name in this branch
- 9 core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d7\MigrateSystemSiteTranslationTest
Same name and namespace in other branches
- 11.x core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d6\MigrateSystemSiteTranslationTest
- 11.x core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d7\MigrateSystemSiteTranslationTest
- 10 core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d6\MigrateSystemSiteTranslationTest
- 10 core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d7\MigrateSystemSiteTranslationTest
- 8.9.x core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d6\MigrateSystemSiteTranslationTest
- 8.9.x core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d7\MigrateSystemSiteTranslationTest
Upgrade i18n_strings site variables to system.*.yml.
@group migrate_drupal_6
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase implements \Drupal\migrate\MigrateMessageInterface extends \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase extends \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait extends \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\config_translation\Kernel\Migrate\d6\MigrateSystemSiteTranslationTest extends \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait extends \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase extends \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase implements \Drupal\migrate\MigrateMessageInterface extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of MigrateSystemSiteTranslationTest
File
-
core/
modules/ config_translation/ tests/ src/ Kernel/ Migrate/ d6/ MigrateSystemSiteTranslationTest.php, line 12
Namespace
Drupal\Tests\config_translation\Kernel\Migrate\d6View source
class MigrateSystemSiteTranslationTest extends MigrateDrupal6TestBase {
protected static $modules = [
'language',
'config_translation',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->executeMigrations([
'language',
'system_site',
'd6_system_site_translation',
]);
}
/**
* Tests migration of system (site) variables to system.site.yml.
*/
public function testSystemSite() {
$config_translation = \Drupal::service('language_manager')->getLanguageConfigOverride('fr', 'system.site');
$this->assertSame('fr site name', $config_translation->get('name'));
$this->assertSame('fr_site_mail@example.com', $config_translation->get('mail'));
$this->assertSame('fr Migrate rocks', $config_translation->get('slogan'));
$this->assertSame('/fr-user', $config_translation->get('page.403'));
$this->assertSame('/fr-page-not-found', $config_translation->get('page.404'));
$this->assertSame('/node', $config_translation->get('page.front'));
$this->assertNull($config_translation->get('admin_compact_mode'));
$config_translation = \Drupal::service('language_manager')->getLanguageConfigOverride('zu', 'system.site');
$this->assertSame('zu - site_name', $config_translation->get('name'));
$this->assertSame('site_mail@example.com', $config_translation->get('mail'));
$this->assertSame('Migrate rocks', $config_translation->get('slogan'));
$this->assertSame('/zu-user', $config_translation->get('page.403'));
$this->assertSame('/zu-page-not-found', $config_translation->get('page.404'));
$this->assertSame('/node', $config_translation->get('page.front'));
$this->assertNull($config_translation->get('admin_compact_mode'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.