function MigrateDefaultLanguageTest::testMigrationWithExistingLanguage
Same name in this branch
- 11.x core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php \Drupal\Tests\language\Kernel\Migrate\d7\MigrateDefaultLanguageTest::testMigrationWithExistingLanguage()
Same name in other branches
- 9 core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php \Drupal\Tests\language\Kernel\Migrate\d6\MigrateDefaultLanguageTest::testMigrationWithExistingLanguage()
- 9 core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php \Drupal\Tests\language\Kernel\Migrate\d7\MigrateDefaultLanguageTest::testMigrationWithExistingLanguage()
- 8.9.x core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php \Drupal\Tests\language\Kernel\Migrate\d6\MigrateDefaultLanguageTest::testMigrationWithExistingLanguage()
- 8.9.x core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php \Drupal\Tests\language\Kernel\Migrate\d7\MigrateDefaultLanguageTest::testMigrationWithExistingLanguage()
- 10 core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php \Drupal\Tests\language\Kernel\Migrate\d6\MigrateDefaultLanguageTest::testMigrationWithExistingLanguage()
- 10 core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php \Drupal\Tests\language\Kernel\Migrate\d7\MigrateDefaultLanguageTest::testMigrationWithExistingLanguage()
Tests language_default migration with an existing language.
File
-
core/
modules/ language/ tests/ src/ Kernel/ Migrate/ d6/ MigrateDefaultLanguageTest.php, line 26
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.