public function DownloadTest::testOverwritingDownload in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Kernel/process/DownloadTest.php \Drupal\Tests\migrate\Kernel\process\DownloadTest::testOverwritingDownload()
- 9 core/modules/migrate/tests/src/Kernel/process/DownloadTest.php \Drupal\Tests\migrate\Kernel\process\DownloadTest::testOverwritingDownload()
Tests a download that overwrites an existing local file.
File
- core/
modules/ migrate/ tests/ src/ Kernel/ process/ DownloadTest.php, line 36
Class
- DownloadTest
- Tests the download process plugin.
Namespace
Drupal\Tests\migrate\Kernel\processCode
public function testOverwritingDownload() {
// Create a pre-existing file at the destination.
$destination_uri = $this
->createUri('existing_file.txt');
// Test destructive download.
$actual_destination = $this
->doTransform($destination_uri);
$this
->assertSame($destination_uri, $actual_destination, 'Import returned a destination that was not renamed');
$this
->assertFileDoesNotExist('public://existing_file_0.txt');
}