public function FileSecurityTest::testWriteWebConfig in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php \Drupal\Tests\Component\FileSecurity\FileSecurityTest::testWriteWebConfig()
- 9 core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php \Drupal\Tests\Component\FileSecurity\FileSecurityTest::testWriteWebConfig()
@covers ::writeWebConfig
File
- core/
tests/ Drupal/ Tests/ Component/ FileSecurity/ FileSecurityTest.php, line 67
Class
- FileSecurityTest
- Tests the file security component.
Namespace
Drupal\Tests\Component\FileSecurityCode
public function testWriteWebConfig() {
vfsStream::setup('root');
$this
->assertTrue(FileSecurity::writeWebConfig(vfsStream::url('root')));
$web_config_file = vfsStream::url('root') . '/web.config';
$this
->assertFileExists($web_config_file);
$this
->assertEquals('0444', substr(sprintf('%o', fileperms($web_config_file)), -4));
}