You are here

public function SmartSqlMigrateExecutableTest::providerTestSmartSqlMigrateExecutableCompatibility in Smart SQL ID Map 1.1.x

Data provider for ::testSmartSqlMigrateExecutableCompatibility.

Return value

array The test cases.

File

tests/src/Kernel/SmartSqlMigrateExecutableTest.php, line 105

Class

SmartSqlMigrateExecutableTest
Tests Smart SQL ID map's compatibility with core's MigrateExecutable.

Namespace

Drupal\Tests\smart_sql_idmap\Kernel

Code

public function providerTestSmartSqlMigrateExecutableCompatibility() {
  return [
    'Rollback delete' => [
      'Source records' => [
        [
          'source_id' => '1',
          'destination_id' => '1',
        ],
      ],
    ],
    'Rollback preserve' => [
      'Source records' => [
        [
          'source_id' => '1',
          'destination_id' => '1',
          'rollback_action' => '1',
        ],
      ],
    ],
    'Rolling back a failed row' => [
      'Source records' => [
        [
          'source_id' => '1',
          'destination_id' => NULL,
          'source_row_status' => '2',
        ],
      ],
    ],
    'Rolling back with ID map having records with duplicated destination ID' => [
      'Source records' => [
        [
          'source_id' => '1',
          'destination_id' => '1',
        ],
        [
          'source_id' => '2',
          'destination_id' => '2',
        ],
        [
          'source_id' => '3',
          'destination_id' => '1',
        ],
      ],
    ],
  ];
}