function FileDeleteRecursiveRemoteTest::testSingleFile
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/File/FileDeleteRecursiveRemoteTest.php \Drupal\KernelTests\Core\File\FileDeleteRecursiveRemoteTest::testSingleFile()
Tests deleting a single file via a remote stream wrapper.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ File/ FileDeleteRecursiveRemoteTest.php, line 47
Class
- FileDeleteRecursiveRemoteTest
- Tests deleteRecursive() with remote stream wrappers where realpath() is FALSE.
Namespace
Drupal\KernelTests\Core\FileCode
public function testSingleFile() : void {
$filepath = 'dummy-remote://' . $this->randomMachineName();
file_put_contents($filepath, '');
$this->assertTrue(\Drupal::service('file_system')->deleteRecursive($filepath));
$this->assertFileDoesNotExist($filepath);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.