protected function MigrateLanguageTest::assertLanguage in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/language/src/Tests/Migrate/MigrateLanguageTest.php \Drupal\language\Tests\Migrate\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/ src/ Tests/ Migrate/ MigrateLanguageTest.php - Tests migration of Drupal 6 languages to configurable language entities.
File
- core/
modules/ language/ src/ Tests/ Migrate/ MigrateLanguageTest.php, line 37 - Contains \Drupal\language\Tests\Migrate\MigrateLanguageTest.
Class
- MigrateLanguageTest
- @group migrate_drupal_6
Namespace
Drupal\language\Tests\MigrateCode
protected function assertLanguage($id, $label, $direction = ConfigurableLanguageInterface::DIRECTION_LTR, $weight = 0) {
/** @var \Drupal\language\ConfigurableLanguageInterface $language */
$language = ConfigurableLanguage::load($id);
$this
->assertTrue($language instanceof ConfigurableLanguageInterface);
$this
->assertIdentical($label, $language
->label());
$this
->assertIdentical($direction, $language
->getDirection());
$this
->assertIdentical(0, $language
->getWeight());
$this
->assertFalse($language
->isLocked());
}