public function ReadOnlyFilesystemTest::testSameLogicDiskNotWritable in Automatic Updates 8
Tests non-writable core and vendor directories on same logic disk.
@covers ::run
File
- tests/
src/ Kernel/ ReadinessChecker/ ReadOnlyFilesystemTest.php, line 99
Class
- ReadOnlyFilesystemTest
- @coversDefaultClass \Drupal\automatic_updates\ReadinessChecker\ReadOnlyFilesystem
Namespace
Drupal\Tests\automatic_updates\Kernel\ReadinessCheckerCode
public function testSameLogicDiskNotWritable() {
$file_system = $this
->createMock(FileSystemInterface::class);
$file_system
->expects($this
->once())
->method('copy')
->willThrowException(new FileException());
$root = self::getVfsRoot();
$readOnly = new ReadOnlyFilesystem($root, $this->container
->get('logger.channel.automatic_updates'), $file_system);
$this
->assertEquals([
"Logical disk at \"{$root}\" is read only. Updates to Drupal cannot be applied against a read only file system.",
], $readOnly
->run());
}