You are here

public function EntityFileTest::testSuccessfulCopies in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/file/src/Tests/Migrate/EntityFileTest.php \Drupal\file\Tests\Migrate\EntityFileTest::testSuccessfulCopies()

Test successful imports/copies.

File

core/modules/file/src/Tests/Migrate/EntityFileTest.php, line 53
Contains \Drupal\file\Tests\Migrate\EntityFileTest.

Class

EntityFileTest
Tests the entity file destination plugin.

Namespace

Drupal\file\Tests\Migrate

Code

public function testSuccessfulCopies() {
  foreach ($this
    ->localFileDataProvider() as $data) {
    list($row_values, $destination_path, $expected, $source_base_path) = $data;
    $this
      ->doImport($row_values, $destination_path, $source_base_path);
    $message = $expected ? sprintf('File %s exists', $destination_path) : sprintf('File %s does not exist', $destination_path);
    $this
      ->assertIdentical($expected, is_file($destination_path), $message);
  }
}