You are here

protected function MigrateTableTest::setUp in Migrate Plus 8.3

Same name and namespace in other branches
  1. 8.5 tests/src/Kernel/MigrateTableTest.php \Drupal\Tests\migrate_plus\Kernel\MigrateTableTest::setUp()
  2. 8.4 tests/src/Kernel/MigrateTableTest.php \Drupal\Tests\migrate_plus\Kernel\MigrateTableTest::setUp()

Overrides MigrateTestBase::setUp

File

tests/src/Kernel/MigrateTableTest.php, line 26

Class

MigrateTableTest
Tests migration destination table.

Namespace

Drupal\Tests\migrate_plus\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this->connection = Database::getConnection();
  $this->connection
    ->schema()
    ->createTable(static::TABLE_NAME, [
    'description' => 'Test table',
    'fields' => [
      'data' => [
        'type' => 'varchar',
        'length' => '32',
        'not null' => TRUE,
      ],
      'data2' => [
        'type' => 'varchar',
        'length' => '32',
        'not null' => TRUE,
      ],
      'data3' => [
        'type' => 'varchar',
        'length' => '32',
        'not null' => TRUE,
      ],
    ],
    'primary key' => [
      'data',
    ],
  ]);
}