public function FileSystemTest::testCopySelfRename in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php \Drupal\KernelTests\Core\File\FileSystemTest::testCopySelfRename()
- 9 core/tests/Drupal/KernelTests/Core/File/FileSystemTest.php \Drupal\KernelTests\Core\File\FileSystemTest::testCopySelfRename()
@covers ::copy
File
- core/
tests/ Drupal/ KernelTests/ Core/ File/ FileSystemTest.php, line 87
Class
- FileSystemTest
- @coversDefaultClass \Drupal\Core\File\FileSystem @group File
Namespace
Drupal\KernelTests\Core\FileCode
public function testCopySelfRename() {
$uri = 'public://test.txt';
touch($uri);
$this->fileSystem
->copy($uri, $uri);
$this
->assertFileExists('public://test_0.txt');
}