function DownloadTest::testOverwritingDownload
Same name in other branches
- 9 core/modules/migrate/tests/src/Kernel/process/DownloadTest.php \Drupal\Tests\migrate\Kernel\process\DownloadTest::testOverwritingDownload()
- 8.9.x core/modules/migrate/tests/src/Kernel/process/DownloadTest.php \Drupal\Tests\migrate\Kernel\process\DownloadTest::testOverwritingDownload()
- 11.x 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 38
Class
- DownloadTest
- Tests the download process plugin.
Namespace
Drupal\Tests\migrate\Kernel\processCode
public function testOverwritingDownload() : void {
// 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');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.