protected function MigrateLanguageTest::assertLanguage in Drupal 9
Same name and namespace in other branches
- 8 core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageTest.php \Drupal\Tests\language\Kernel\Migrate\d6\MigrateLanguageTest::assertLanguage()
Asserts various properties of a configurable language entity.
Parameters
string $id: The language ID.
string $label: The language name.
string $direction: (optional) The language's direction (one of the DIRECTION_* constants in ConfigurableLanguageInterface). Defaults to LTR.
int $weight: (optional) The weight of the language. Defaults to 0.
1 call to MigrateLanguageTest::assertLanguage()
- MigrateLanguageTest::testLanguageMigration in core/
modules/ language/ tests/ src/ Kernel/ Migrate/ d6/ MigrateLanguageTest.php - Tests migration of Drupal 6 languages to configurable language entities.
File
- core/
modules/ language/ tests/ src/ Kernel/ Migrate/ d6/ MigrateLanguageTest.php, line 32
Class
- MigrateLanguageTest
- @group migrate_drupal_6
Namespace
Drupal\Tests\language\Kernel\Migrate\d6Code
protected function assertLanguage($id, $label, $direction = ConfigurableLanguageInterface::DIRECTION_LTR, $weight = 0) {
/** @var \Drupal\language\ConfigurableLanguageInterface $language */
$language = ConfigurableLanguage::load($id);
$this
->assertInstanceOf(ConfigurableLanguageInterface::class, $language);
$this
->assertSame($label, $language
->label());
$this
->assertSame($direction, $language
->getDirection());
$this
->assertSame(0, $language
->getWeight());
$this
->assertFalse($language
->isLocked());
}