You are here

protected function SmartSqlMigrateExecutableTest::getRecordsOfSqlIdMap in Smart SQL ID Map 1.1.x

Returns the actual records found in a sql ID map table.

Parameters

\Drupal\migrate\Plugin\migrate\id_map\Sql $id_map: A sql ID map plugin instance.

Return value

string[][] The actual records found in the map table.

1 call to SmartSqlMigrateExecutableTest::getRecordsOfSqlIdMap()
SmartSqlMigrateExecutableTest::testSmartSqlMigrateExecutableCompatibility in tests/src/Kernel/SmartSqlMigrateExecutableTest.php
Tests Smart SQL ID map's compatibility with core's MigrateExecutable.

File

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

Class

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

Namespace

Drupal\Tests\smart_sql_idmap\Kernel

Code

protected function getRecordsOfSqlIdMap(Sql $id_map) {
  $map_table_name = $id_map
    ->mapTableName();
  return \Drupal::database()
    ->select($map_table_name, $map_table_name)
    ->fields($map_table_name)
    ->execute()
    ->fetchAll(\PDO::FETCH_ASSOC);
}