function FileSystemTest::testChmodFile
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/File/FileSystemTest.php \Drupal\Tests\Core\File\FileSystemTest::testChmodFile()
- 8.9.x core/tests/Drupal/Tests/Core/File/FileSystemTest.php \Drupal\Tests\Core\File\FileSystemTest::testChmodFile()
- 11.x core/tests/Drupal/Tests/Core/File/FileSystemTest.php \Drupal\Tests\Core\File\FileSystemTest::testChmodFile()
@covers ::chmod
File
-
core/
tests/ Drupal/ Tests/ Core/ File/ FileSystemTest.php, line 54
Class
- FileSystemTest
- @coversDefaultClass \Drupal\Core\File\FileSystem
Namespace
Drupal\Tests\Core\FileCode
public function testChmodFile() : void {
vfsStream::setup('dir');
vfsStream::create([
'test.txt' => 'asdf',
]);
$uri = 'vfs://dir/test.txt';
$this->assertTrue($this->fileSystem
->chmod($uri));
$this->assertFilePermissions(FileSystem::CHMOD_FILE, $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.