You are here

public function FileSecurityTest::testWriteHtaccessFailure in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/FileSecurity/FileSecurityTest.php \Drupal\Tests\Component\FileSecurity\FileSecurityTest::testWriteHtaccessFailure()
  2. 9 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 59

Class

FileSecurityTest
Tests the file security component.

Namespace

Drupal\Tests\Component\FileSecurity

Code

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