diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityFile.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityFile.php
index b338fba..ed28297 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/EntityFile.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityFile.php
@@ -78,7 +78,7 @@ public function import(Row $row, array $old_destination_id_values = array()) {
         throw new MigrateException(t('File %file could not be copied because a file by that name already exists in the destination directory (%destination)', array('%file' => $source, '%destination' => $original_destination)));
       }
       $source = $this->urlencode($source);
-      $copied = copy($source, $destination);
+      $copied = @copy($source, $destination);
     }
     if ($copied) {
       return parent::import($row, $old_destination_id_values);
diff --git a/core/modules/migrate/tests/src/Unit/destination/EntityFileTest.php b/core/modules/migrate/tests/src/Unit/destination/EntityFileTest.php
new file mode 100644
index 0000000..a08a123
--- /dev/null
+++ b/core/modules/migrate/tests/src/Unit/destination/EntityFileTest.php
@@ -0,0 +1,175 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\migrate\Unit\destination\EntityFileTest.
+ */
+
+namespace Drupal\Tests\migrate\Unit\destination;
+
+use Drupal\migrate\Row;
+use Drupal\migrate\Plugin\migrate\destination\EntityFile;
+use Drupal\simpletest\KernelTestBase;
+use Drupal\Core\Entity\ContentEntityInterface;
+use Drupal\entity_test\Entity\EntityTest;
+use Drupal\migrate\MigrateException;
+
+/**
+ * Tests the entity file destination plugin.
+ *
+ * @group migrate
+ */
+class EntityFileTest extends KernelTestBase {
+
+  /**
+   * Modules to install.
+   *
+   * @var array
+   */
+  public static $modules = array('system', 'entity_test', 'user');
+
+  /**
+   * @var \Drupal\Tests\migrate\Unit\destination\TestEntityFile $destination
+   */
+  protected $destination;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    parent::setUp();
+    $this->destination = new TestEntityFile([]);
+
+    $this->installConfig(['system']);
+    file_put_contents('/tmp/test-file.jpg', '');
+  }
+
+  /**
+   * Test successful imports/copies.
+   *
+   * @throws \Drupal\migrate\MigrateException
+   */
+  public function testSuccessfulCopies() {
+    foreach ($this->localFileDataProvider() as $data) {
+      list($row_values, $destination_path, $expected) = $data;
+      $remote = isset($data[3]) ? $data[3] : FALSE;
+
+      $this->doImport($row_values, $destination_path, $remote);
+      $message = $expected ? sprintf('File %s exists', $destination_path) : sprintf('File %s does not exist', $destination_path);
+      $this->assertIdentical($expected, is_file($destination_path), $message);
+    }
+  }
+
+  /**
+   * The data provider for testing the file destination.
+   *
+   * @return array
+   *   An array of file permutations to test.
+   */
+  protected function localFileDataProvider() {
+    return [
+      // Test a local to local copy.
+      [['filepath' => '/core/modules/simpletest/files/image-test.jpg'], 'public://file1.jpg', TRUE],
+      // Test a temporary file using an absolute path.
+      [['filepath' => '/tmp/test-file.jpg'], 'temporary://test.jpg', TRUE],
+      // Test a remote path to local.
+      [['filepath' => '/core/modules/simpletest/files/image-test.jpg'], 'public://remote-file.jpg', TRUE, TRUE],
+      // Test a remote path to local inside a folder that doesn't exist.
+      [['filepath' => '/core/modules/simpletest/files/image-test.jpg'], 'public://folder/remote-file.jpg', TRUE, TRUE],
+
+      //[['filepath' => '/none/existent/file'], '/destination/also/doesntexist', FALSE],
+    ];
+  }
+
+
+  /**
+   * Test that non-existent files throw an exception.
+   */
+  public function testNonExistentSourceFile() {
+    try {
+      $this->doImport(['filepath' => '/none/existent/file'], 'public://wontmatter.jpg');
+    }
+    catch (MigrateException $e) {}
+    preg_match('/^File (.*) could not be copied/', $e->getMessage(), $matches);
+    $this->assertTrue(count($matches) > 0, 'File could not be copied exception');
+  }
+
+  /**
+   * Test the output when the destination does not exist.
+   */
+  public function testNonExistentDestination() {
+
+  }
+
+  /**
+   * Test the output when the source and the destination doesn't exist.
+   */
+  public function testNonExistentSourceAndDestination() {
+
+  }
+
+  /**
+   * Do an import using the destination.
+   *
+   * @param array $row_values
+   *   An array of row values.
+   * @param string $destination_path
+   *   The destination path to copy to.
+   * @param bool $remote
+   *   Whehter the source file is remote.
+   * @return array
+   *   An array of saved entities ids.
+   *
+   * @throws \Drupal\migrate\MigrateException
+   */
+  protected function doImport($row_values, $destination_path, $remote = FALSE) {
+    $row = new Row($row_values, []);
+    $row->setDestinationProperty('uri', $destination_path);
+
+    // Set the base path based on a remote or local source.
+    global $base_url;
+    $this->destination->configuration['source_base_path'] = $remote ? $base_url : DRUPAL_ROOT;
+
+
+    // Importing asserts there are no errors, then we just check the file has
+    // been copied into place.
+    return $this->destination->import($row, array());
+  }
+
+}
+
+
+class TestEntityFile extends EntityFile {
+
+  /**
+   * @var \Drupal\Core\Entity\ContentEntityInterface
+   */
+  public $mockEntity;
+
+  public $configuration;
+
+  public function __construct($configuration) {
+    $configuration +=  array(
+      'source_base_path' => '',
+      'source_path_property' => 'filepath',
+      'destination_path_property' => 'uri',
+      'move' => FALSE,
+      'urlencode' => FALSE,
+    );
+    $this->configuration = $configuration;
+    // We need a mock entity to be passed to save to prevent strict exceptions.
+    $this->mockEntity = EntityTest::create();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getEntity(Row $row, array $old_destination_id_values) {
+    return $this->mockEntity;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function save(ContentEntityInterface $entity, array $old_destination_id_values = array()) {}
+}
