function SqlTest::setUp

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

Overrides MigrateTestBase::setUp

File

core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php, line 52

Class

SqlTest
Tests that the migrate map table is created.

Namespace

Drupal\Tests\migrate\Kernel\Plugin\id_map

Code

public function setUp() : void {
    parent::setUp();
    $this->database = \Drupal::database();
    $this->eventDispatcher = $this->prophesize(EventDispatcherInterface::class)
        ->reveal();
    $this->migrationPluginManager = \Drupal::service('plugin.manager.migration');
    $this->migrationDefinition = [
        'id' => 'test',
        'source' => [
            'plugin' => 'embedded_data',
            'data_rows' => [
                [
                    'alpha' => '1',
                    'bravo' => '2',
                    'charlie' => '3',
                    'delta' => '4',
                    'echo' => '5',
                ],
            ],
            'ids' => [],
        ],
        'process' => [],
        'destination' => [
            'plugin' => 'null',
        ],
    ];
}

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