public function EntityReferenceRevisionsDestinationTest::testGetEntityTypeId in Entity Reference Revisions 8
Tests get entity type id.
@dataProvider getEntityTypeIdDataProvider
@covers ::getEntityTypeId
File
- tests/
src/ Kernel/ Plugin/ migrate/ destination/ EntityReferenceRevisionsDestinationTest.php, line 59
Class
- EntityReferenceRevisionsDestinationTest
- Tests the migration destination plugin.
Namespace
Drupal\Tests\entity_reference_revisions\Kernel\Plugin\migrate\destinationCode
public function testGetEntityTypeId(array $definition, $expected) {
/** @var \Drupal\migrate\Plugin\Migration $migration */
$migration = $this->migrationPluginManager
->createStubMigration($definition);
/** @var \Drupal\entity_reference_revisions\Plugin\migrate\destination\EntityReferenceRevisions $destination */
$destination = $migration
->getDestinationPlugin();
/** @var \Drupal\Core\Entity\EntityStorageBase $storage */
$storage = $this
->readAttribute($destination, 'storage');
$actual = $this
->readAttribute($storage, 'entityTypeId');
$this
->assertEquals($expected, $actual);
}