function MigrateUpgradeTestBase::assertFileMigrations
Checks public and private files are copied but not temporary files.
1 call to MigrateUpgradeTestBase::assertFileMigrations()
- FilePathTest::testFilePath in core/
modules/ migrate_drupal_ui/ tests/ src/ Functional/ d7/ FilePathTest.php  - Executes all steps of migrations upgrade.
 
File
- 
              core/
modules/ migrate_drupal_ui/ tests/ src/ Functional/ MigrateUpgradeTestBase.php, line 344  
Class
- MigrateUpgradeTestBase
 - Provides a base class for testing migration upgrades in the UI.
 
Namespace
Drupal\Tests\migrate_drupal_ui\FunctionalCode
protected function assertFileMigrations() {
  $fs = \Drupal::service('file_system');
  $files = $this->getManagedFiles();
  foreach ($files as $file) {
    preg_match('/^(private|public|temporary):/', $file['uri'], $matches);
    $scheme = $matches[1];
    $filepath = $fs->realpath($file['uri']);
    if ($scheme === 'temporary') {
      $this->assertFileDoesNotExist($filepath);
    }
    else {
      $this->assertFileExists($filepath);
    }
  }
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.