You are here

public static function MediaMigrationSourceDatabaseTrait::getFileUsageTableData in Media Migration 8

Returns the values for the "field_usage" database table.

Return value

array[] An array of database table records with values, keyed by the column name.

1 call to MediaMigrationSourceDatabaseTrait::getFileUsageTableData()
FileEntitySourceFieldInstanceTest::providerSource in tests/src/Kernel/Plugin/migrate/source/d7/FileEntitySourceFieldInstanceTest.php
The data provider.

File

tests/src/Traits/MediaMigrationSourceDatabaseTrait.php, line 546

Class

MediaMigrationSourceDatabaseTrait
Source database table values for Media Migration's tests.

Namespace

Drupal\Tests\media_migration\Traits

Code

public static function getFileUsageTableData() {
  return [
    [
      'fid' => 1,
      'module' => 'media',
      'type' => 'node',
      'id' => 1,
      'count' => 1,
    ],
    [
      'fid' => 2,
      'module' => 'file',
      'type' => 'node',
      'id' => 1,
      'count' => 1,
    ],
    [
      'fid' => 3,
      'module' => 'file',
      'type' => 'node',
      'id' => 1,
      'count' => 1,
    ],
    [
      'fid' => 4,
      'module' => 'file',
      'type' => 'node',
      'id' => 1,
      'count' => 1,
    ],
    [
      'fid' => 7,
      'module' => 'file',
      'type' => 'node',
      'id' => 2,
      'count' => 1,
    ],
  ];
}