MigrateSystemMaintenanceTranslationTest.php

Same filename in this branch
  1. 10 core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php
Same filename in other branches
  1. 9 core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php
  2. 9 core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php
  3. 8.9.x core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php
  4. 8.9.x core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php
  5. 11.x core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php
  6. 11.x core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php

Namespace

Drupal\Tests\config_translation\Kernel\Migrate\d6

File

core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\config_translation\Kernel\Migrate\d6;

use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;

/**
 * Upgrade i18n maintenance variables to system.*.yml.
 *
 * @group migrate_drupal_6
 */
class MigrateSystemMaintenanceTranslationTest extends MigrateDrupal6TestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'language',
        'config_translation',
    ];
    
    /**
     * {@inheritdoc}
     */
    protected function setUp() : void {
        parent::setUp();
        $this->executeMigrations([
            'language',
            'system_maintenance',
            'd6_system_maintenance_translation',
        ]);
    }
    
    /**
     * Tests migration of system variables to system.maintenance.yml.
     */
    public function testSystemMaintenance() : void {
        $config = \Drupal::service('language_manager')->getLanguageConfigOverride('fr', 'system.maintenance');
        $this->assertSame('fr - Drupal is currently under maintenance. We should be back shortly. Thank you for your patience.', $config->get('message'));
    }

}

Classes

Title Deprecated Summary
MigrateSystemMaintenanceTranslationTest Upgrade i18n maintenance variables to system.*.yml.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.