public function AddressFieldTest::testPlugin in Address 8
Tests discovery of the field plugin.
File
- tests/
src/ Kernel/ Plugin/ migrate/ field/ AddressFieldTest.php, line 30
Class
- AddressFieldTest
- Tests the address field field plugin.
Namespace
Drupal\Tests\address\Kernel\Plugin\migrate\fieldCode
public function testPlugin() {
$migration = $this
->prophesize(MigrationInterface::class)
->reveal();
$field_plugin_manager = $this->container
->get('plugin.manager.migrate.field');
$definition = $field_plugin_manager
->getDefinition('addressfield');
$this
->assertNotEmpty($definition);
$field_plugin = $field_plugin_manager
->createInstance('addressfield', [], $migration);
$this
->assertInstanceOf(AddressField::class, $field_plugin);
}