function FileSecurityTest::testWriteWebConfig
@covers ::writeWebConfig
      
    
File
- 
              core/
tests/ Drupal/ Tests/ Component/ FileSecurity/ FileSecurityTest.php, line 69  
Class
- FileSecurityTest
 - Tests the file security component.
 
Namespace
Drupal\Tests\Component\FileSecurityCode
public function testWriteWebConfig() : void {
  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));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.