function MigrateFileTest::testFileMigration
Same name in other branches
- 9 core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php \Drupal\Tests\file\Kernel\Migrate\d7\MigrateFileTest::testFileMigration()
- 8.9.x core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php \Drupal\Tests\file\Kernel\Migrate\d7\MigrateFileTest::testFileMigration()
- 10 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 47
Class
- MigrateFileTest
- Migrates all files in the file_managed table.
Namespace
Drupal\Tests\file\Kernel\Migrate\d7Code
public function testFileMigration() : void {
$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.