function ContentEntityTest::testConstructorEntityTypeMissing
Tests the constructor for missing entity_type.
File
-
core/
modules/ migrate_drupal/ tests/ src/ Kernel/ Plugin/ migrate/ source/ ContentEntityTest.php, line 179
Class
- ContentEntityTest
- Tests the entity content source plugin.
Namespace
Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\sourceCode
public function testConstructorEntityTypeMissing() {
$migration = $this->prophesize(MigrationInterface::class)
->reveal();
$configuration = [];
$plugin_definition = [
'entity_type' => '',
];
$this->expectException(InvalidPluginDefinitionException::class);
$this->expectExceptionMessage('Missing required "entity_type" definition.');
ContentEntity::create($this->container, $configuration, 'content_entity', $plugin_definition, $migration);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.