public function LocalTest::testHtaccessNotOverwritten in Flysystem 8
Same name and namespace in other branches
- 3.x tests/src/Unit/Flysystem/LocalTest.php \Drupal\Tests\flysystem\Unit\Flysystem\LocalTest::testHtaccessNotOverwritten()
- 2.0.x tests/src/Unit/Flysystem/LocalTest.php \Drupal\Tests\flysystem\Unit\Flysystem\LocalTest::testHtaccessNotOverwritten()
- 3.0.x tests/src/Unit/Flysystem/LocalTest.php \Drupal\Tests\flysystem\Unit\Flysystem\LocalTest::testHtaccessNotOverwritten()
@covers ::ensure @covers ::writeHtaccess
File
- tests/
src/ Unit/ Flysystem/ LocalTest.php, line 116
Class
- LocalTest
- @coversDefaultClass \Drupal\flysystem\Flysystem\Local @group flysystem
Namespace
Drupal\Tests\flysystem\Unit\FlysystemCode
public function testHtaccessNotOverwritten() {
file_put_contents('foo/bar/.htaccess', 'htcontent');
$result = (new Local('foo/bar'))
->ensure();
$this
->assertSame(1, count($result));
$this
->assertSame(RfcLogLevel::INFO, $result[0]['severity']);
$this
->assertSame('htcontent', file_get_contents('foo/bar/.htaccess'));
}