public function FileSystemTest::testChmodDir in Drupal 8
Same name and namespace in other branches
- 9 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 67
Class
- FileSystemTest
- @coversDefaultClass \Drupal\Core\File\FileSystem
Namespace
Drupal\Tests\Core\FileCode
public function testChmodDir() {
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);
}