protected function MediaMigrationDatabaseTraitTest::addRecordsToSourceDatabase in Media Migration 8
Updates the source database with the given records.
Parameters
string[][][] $db_records: The column values to insert, indexed by the column name, per row, and the table name.
Throws
\Exception
2 calls to MediaMigrationDatabaseTraitTest::addRecordsToSourceDatabase()
- MediaMigrationDatabaseTraitTest::testGetFileEntityBaseQuery in tests/
src/ Kernel/ Plugin/ migrate/ source/ d7/ MediaMigrationDatabaseTraitTest.php - @covers ::getFileEntityBaseQuery
- MediaMigrationDatabaseTraitTest::testGetFilePlainBaseQuery in tests/
src/ Kernel/ Plugin/ migrate/ source/ d7/ MediaMigrationDatabaseTraitTest.php - @covers ::getFilePlainBaseQuery
File
- tests/
src/ Kernel/ Plugin/ migrate/ source/ d7/ MediaMigrationDatabaseTraitTest.php, line 735
Class
- MediaMigrationDatabaseTraitTest
- @coversDefaultClass \Drupal\media_migration\Plugin\migrate\source\d7\MediaMigrationDatabaseTrait
Namespace
Drupal\Tests\media_migration\Kernel\Plugin\migrate\source\d7Code
protected function addRecordsToSourceDatabase(array $db_records) {
foreach ($db_records as $table => $records) {
foreach ($records as $record) {
$this->sourceDatabase
->insert($table)
->fields($record)
->execute();
}
}
}