You are here

public function MigrateSystemSiteTranslationTest::testSystemSite in Drupal 10

Same name in this branch
  1. 10 core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d6\MigrateSystemSiteTranslationTest::testSystemSite()
  2. 10 core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d7\MigrateSystemSiteTranslationTest::testSystemSite()
Same name and namespace in other branches
  1. 8 core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d6\MigrateSystemSiteTranslationTest::testSystemSite()
  2. 9 core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php \Drupal\Tests\config_translation\Kernel\Migrate\d6\MigrateSystemSiteTranslationTest::testSystemSite()

Tests migration of system (site) variables to system.site.yml.

File

core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php, line 34

Class

MigrateSystemSiteTranslationTest
Upgrade i18n_strings site variables to system.*.yml.

Namespace

Drupal\Tests\config_translation\Kernel\Migrate\d6

Code

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'));
}