function 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\d7Code
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));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.