function MigrateDefaultLanguageTest::testMigrationWithExistingLanguage
Tests language_default migration with an existing language.
File
- 
              core/
modules/ language/ tests/ src/ Kernel/ Migrate/ d6/ MigrateDefaultLanguageTest.php, line 28  
Class
- MigrateDefaultLanguageTest
 - Tests the default language variable migration.
 
Namespace
Drupal\Tests\language\Kernel\Migrate\d6Code
public function testMigrationWithExistingLanguage() : void {
  $this->setDefaultLanguage('fr');
  $this->startCollectingMessages();
  $this->executeMigrations([
    'language',
    'default_language',
  ]);
  // Tests the language is loaded and is the default language.
  $default_language = ConfigurableLanguage::load('fr');
  $this->assertNotNull($default_language);
  $this->assertSame('fr', $this->config('system.site')
    ->get('default_langcode'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.