function FileSystemTest::testChmodDir
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/File/FileSystemTest.php \Drupal\Tests\Core\File\FileSystemTest::testChmodDir()
- 8.9.x core/tests/Drupal/Tests/Core/File/FileSystemTest.php \Drupal\Tests\Core\File\FileSystemTest::testChmodDir()
- 10 core/tests/Drupal/Tests/Core/File/FileSystemTest.php \Drupal\Tests\Core\File\FileSystemTest::testChmodDir()
@covers ::chmod
File
-
core/
tests/ Drupal/ Tests/ Core/ File/ FileSystemTest.php, line 68
Class
- FileSystemTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21File%21FileSystem.php/class/FileSystem/11.x" title="Provides helpers to operate on files and stream wrappers." class="local">\Drupal\Core\File\FileSystem</a>
Namespace
Drupal\Tests\Core\FileCode
public function testChmodDir() : void {
vfsStream::setup('dir');
vfsStream::create([
'nested_dir' => [],
]);
$uri = 'vfs://dir/nested_dir';
$this->assertTrue($this->fileSystem
->chmod($uri));
$this->assertFilePermissions(FileSystem::CHMOD_DIRECTORY, $uri);
$this->assertTrue($this->fileSystem
->chmod($uri, 0444));
$this->assertFilePermissions(0444, $uri);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.