function FileSystemTest::testCopySelfRename
Tests copy self rename.
@legacy-covers ::copy
File
-
core/
tests/ Drupal/ KernelTests/ Core/ File/ FileSystemTest.php, line 99
Class
Namespace
Drupal\KernelTests\Core\FileCode
public function testCopySelfRename() : void {
$uri = 'public://test.txt';
touch($uri);
$this->fileSystem
->copy($uri, $uri);
$this->assertFileExists('public://test_0.txt');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.