function ContentEntityConstructorTest::testConstructor

Tests the constructor.

Attributes

#[DataProvider('providerTestConstructor')]

File

core/modules/migrate/tests/src/Kernel/Plugin/source/ContentEntityConstructorTest.php, line 33

Class

ContentEntityConstructorTest
Tests the constructor of the entity content source plugin.

Namespace

Drupal\Tests\migrate\Kernel\Plugin\source

Code

public function testConstructor(array $configuration, array $plugin_definition, string $exception_class, string $expected) : void {
  $migration = $this->prophesize(MigrationInterface::class)
    ->reveal();
  $this->expectException($exception_class);
  $this->expectExceptionMessage($expected);
  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.