function LogTest::setUp

Same name in other branches
  1. 10 core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php \Drupal\Tests\migrate\Kernel\Plugin\LogTest::setUp()
  2. 11.x core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php \Drupal\Tests\migrate\Kernel\Plugin\LogTest::setUp()

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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.