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