public function ContentEntityConstructorTest::testConstructor in Drupal 10
Tests the constructor.
@dataProvider providerTestConstructor
File
- core/
modules/ migrate_drupal/ tests/ src/ Kernel/ Plugin/ migrate/ source/ ContentEntityConstructorTest.php, line 33
Class
- ContentEntityConstructorTest
- Tests the constructor of the entity content source plugin.
Namespace
Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\sourceCode
public function testConstructor($configuration, $plugin_definition, $exception_class, $expected) {
$migration = $this
->prophesize(MigrationInterface::class)
->reveal();
$this
->expectException($exception_class);
$this
->expectExceptionMessage($expected);
ContentEntity::create($this->container, $configuration, 'content_entity', $plugin_definition, $migration);
}