public function ContentEntityTest::testConstructorEntityTypeMissing in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\ContentEntityTest::testConstructorEntityTypeMissing()
Tests the constructor for missing entity_type.
File
- core/
modules/ migrate_drupal/ tests/ src/ Kernel/ Plugin/ migrate/ source/ ContentEntityTest.php, line 185
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);
}