protected function MigrateTaxonomyVocabularyTest::assertEntity in Drupal 8
Same name and namespace in other branches
- 9 core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d7\MigrateTaxonomyVocabularyTest::assertEntity()
Validate a migrated vocabulary contains the expected values.
Parameters
$id: Entity ID to load and check.
$expected_label: The label the migrated entity should have.
$expected_description: The description the migrated entity should have.
$expected_weight: The weight the migrated entity should have.
1 call to MigrateTaxonomyVocabularyTest::assertEntity()
- MigrateTaxonomyVocabularyTest::testTaxonomyVocabulary in core/
modules/ taxonomy/ tests/ src/ Kernel/ Migrate/ d7/ MigrateTaxonomyVocabularyTest.php - Tests the Drupal 7 taxonomy vocabularies to Drupal 8 migration.
File
- core/
modules/ taxonomy/ tests/ src/ Kernel/ Migrate/ d7/ MigrateTaxonomyVocabularyTest.php, line 41
Class
- MigrateTaxonomyVocabularyTest
- Migrate taxonomy vocabularies to taxonomy.vocabulary.*.yml.
Namespace
Drupal\Tests\taxonomy\Kernel\Migrate\d7Code
protected function assertEntity($id, $expected_label, $expected_description, $expected_weight) {
/** @var \Drupal\taxonomy\VocabularyInterface $entity */
$entity = Vocabulary::load($id);
$this
->assertInstanceOf(VocabularyInterface::class, $entity);
$this
->assertIdentical($expected_label, $entity
->label());
$this
->assertIdentical($expected_description, $entity
->getDescription());
$this
->assertIdentical($expected_weight, $entity
->get('weight'));
}