You are here

public static function MediaMigrationSourceDatabaseTrait::getFileManagedTableData in Media Migration 8

Returns the values for the "field_managed" database table.

Return value

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

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

File

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

Class

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

Namespace

Drupal\Tests\media_migration\Traits

Code

public static function getFileManagedTableData() {
  return [
    [
      'fid' => 1,
      'uid' => 1,
      'filename' => 'Blue PNG',
      'uri' => 'public://blue.png',
      'filemime' => 'image/png',
      'filesize' => 9061,
      'status' => 1,
      'timestamp' => 1587725909,
      'type' => 'image',
    ],
    [
      'fid' => 2,
      'uid' => 1,
      'filename' => 'green.jpg',
      'uri' => 'public://field/image/green.jpg',
      'filemime' => 'image/jpeg',
      'filesize' => 11050,
      'status' => 1,
      'timestamp' => 1587730322,
      'type' => 'image',
    ],
    [
      'fid' => 3,
      'uid' => 1,
      'filename' => 'reg.jpeg',
      'uri' => 'public://red.jpeg',
      'filemime' => 'image/jpeg',
      'filesize' => 19098,
      'status' => 1,
      'timestamp' => 1587726037,
      'type' => 'image',
    ],
    [
      'fid' => 4,
      'uid' => 1,
      'filename' => 'DrupalCon Amsterdam 2019: Keynote - Driesnote',
      'uri' => 'youtube://v/Apqd4ff0NRI',
      'filemime' => 'video/youtube',
      'filesize' => 0,
      'status' => 1,
      'timestamp' => 1587726087,
      'type' => 'video',
    ],
    [
      'fid' => 5,
      'uid' => 1,
      'filename' => 'Responsive Images in Drupal 8',
      'uri' => 'vimeo://v/204517230',
      'filemime' => 'video/vimeo',
      'filesize' => 0,
      'status' => 1,
      'timestamp' => 1587730964,
      'type' => 'video',
    ],
    [
      'fid' => 6,
      'uid' => 1,
      'filename' => 'LICENSE.txt',
      'uri' => 'public://LICENSE.txt',
      'filemime' => 'text/plain',
      'filesize' => 18002,
      'status' => 1,
      'timestamp' => 1587731111,
      'type' => 'document',
    ],
    [
      'fid' => 7,
      'uid' => 2,
      'filename' => 'yellow.jpg',
      'uri' => 'public://field/image/yellow.jpg',
      'filemime' => 'image/jpeg',
      'filesize' => 5363,
      'status' => 1,
      'timestamp' => 1588600435,
      'type' => 'image',
    ],
    [
      'fid' => 8,
      'uid' => 2,
      'filename' => 'video.webm',
      'uri' => 'public://video.webm',
      'filemime' => 'video/webm',
      'filesize' => 18123,
      'status' => 1,
      'timestamp' => 1594037784,
      'type' => 'video',
    ],
    [
      'fid' => 9,
      'uid' => 2,
      'filename' => 'video.mp4',
      'uri' => 'public://video.mp4',
      'filemime' => 'video/mp4',
      'filesize' => 18011,
      'status' => 1,
      'timestamp' => 1594117700,
      'type' => 'video',
    ],
    [
      'fid' => 10,
      'uid' => 2,
      'filename' => 'yellow.webp',
      'uri' => 'public://yellow.webp',
      'filemime' => 'image/webp',
      'filesize' => 3238,
      'status' => 1,
      'timestamp' => 1594191582,
      'type' => 'image',
    ],
    [
      'fid' => 11,
      'uid' => 1,
      'filename' => 'audio.m4a',
      'uri' => 'public://audio.m4a',
      'filemime' => 'audio/mpeg',
      'filesize' => 10711,
      'status' => 1,
      'timestamp' => 1594191582,
      'type' => 'audio',
    ],
    [
      'fid' => 12,
      'uid' => 2,
      'filename' => 'document.odt',
      'uri' => 'public://document.odt',
      'filemime' => 'application/vnd.oasis.opendocument.text',
      'filesize' => 8089,
      'status' => 1,
      'timestamp' => 1594201103,
      'type' => 'document',
    ],
  ];
}