function FileSecurityTest::testWriteHtaccessFailure

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php \Drupal\Tests\Component\FileSecurity\FileSecurityTest::testWriteHtaccessFailure()
  2. 8.9.x core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php \Drupal\Tests\Component\FileSecurity\FileSecurityTest::testWriteHtaccessFailure()
  3. 10 core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php \Drupal\Tests\Component\FileSecurity\FileSecurityTest::testWriteHtaccessFailure()

@covers ::writeHtaccess

File

core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php, line 61

Class

FileSecurityTest
Tests the file security component.

Namespace

Drupal\Tests\Component\FileSecurity

Code

public function testWriteHtaccessFailure() : void {
    vfsStream::setup('root');
    $this->assertFalse(FileSecurity::writeHtaccess(vfsStream::url('root') . '/foo'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.