public function FileCopyTest::testDownloadRemoteUri in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php \Drupal\Tests\migrate\Kernel\process\FileCopyTest::testDownloadRemoteUri()
- 9 core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php \Drupal\Tests\migrate\Kernel\process\FileCopyTest::testDownloadRemoteUri()
Tests that remote URIs are delegated to the download plugin.
File
- core/
modules/ migrate/ tests/ src/ Kernel/ process/ FileCopyTest.php, line 212
Class
- FileCopyTest
- Tests the file_copy process plugin.
Namespace
Drupal\Tests\migrate\Kernel\processCode
public function testDownloadRemoteUri() {
$download_plugin = $this
->createMock(MigrateProcessInterface::class);
$download_plugin
->expects($this
->once())
->method('transform');
$plugin = new FileCopy([], $this
->randomMachineName(), [], $this->container
->get('stream_wrapper_manager'), $this->container
->get('file_system'), $download_plugin);
$plugin
->transform([
'http://drupal.org/favicon.ico',
'/destination/path',
], $this
->createMock(MigrateExecutableInterface::class), new Row([], []), $this
->randomMachineName());
}