protected function SourceCsvFormTest::assertEntity in Migrate Tools 8.4
Validate a migrated vocabulary contains the expected values.
Parameters
string $id: Entity ID to load and check.
string $expected_name: The name the migrated entity should have.
string $expected_description: The description the migrated entity should have.
1 call to SourceCsvFormTest::assertEntity()
- SourceCsvFormTest::testSourceCsvForm in tests/
src/ Functional/ SourceCsvFormTest.php - Tests the form to edit CSV column aliases.
File
- tests/
src/ Functional/ SourceCsvFormTest.php, line 235
Class
- SourceCsvFormTest
- Test the CSV column alias edit form.
Namespace
Drupal\Tests\migrate_tools\FunctionalCode
protected function assertEntity($id, $expected_name, $expected_description) {
/** @var \Drupal\taxonomy\VocabularyInterface $entity */
$entity = Vocabulary::load($id);
$this
->assertTrue($entity instanceof VocabularyInterface);
$this
->assertSame($expected_name, $entity
->label());
$this
->assertSame($expected_description, $entity
->getDescription());
}