You are here

public function MigrateFileTest::testFileMigration in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php \Drupal\Tests\file\Kernel\Migrate\d7\MigrateFileTest::testFileMigration()

Tests that all expected files are migrated.

File

core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php, line 45

Class

MigrateFileTest
Migrates all files in the file_managed table.

Namespace

Drupal\Tests\file\Kernel\Migrate\d7

Code

public function testFileMigration() {
  $this
    ->assertEntity(1, 'cube.jpeg', 'public://cube.jpeg', 'image/jpeg', '3620', '1421727515', '1421727515', '1');

  // Ensure temporary file was not migrated.
  $this
    ->assertNull(File::load(4));
}