You are here

public function LogTest::setUp in Drupal 9

Overrides KernelTestBase::setUp

File

core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php, line 40

Class

LogTest
Tests the Log process plugin.

Namespace

Drupal\Tests\migrate\Kernel\Plugin

Code

public function setUp() : void {
  parent::setUp();
  $definition = [
    'source' => [
      'plugin' => 'embedded_data',
      'data_rows' => [
        [
          'id' => '1',
        ],
      ],
      'ids' => [
        'id' => [
          'type' => 'integer',
        ],
      ],
    ],
    'destination' => [
      'plugin' => 'null',
    ],
  ];

  /** @var \Drupal\migrate\Plugin\migration $migration */
  $migration = \Drupal::service('plugin.manager.migration')
    ->createStubMigration($definition);
  $this->executable = new TestMigrateExecutable($migration);

  // Plugin being tested.
  $this->logPlugin = \Drupal::service('plugin.manager.migrate.process')
    ->createInstance('log');
}