You are here

public function ReadOnlyFilesystemTest::testNoWebRoot in Automatic Updates 8

Tests the readiness check where the root directory does not exist.

@covers ::run

@dataProvider providerNoWebRoot

File

tests/src/Kernel/ReadinessChecker/ReadOnlyFilesystemTest.php, line 34

Class

ReadOnlyFilesystemTest
@coversDefaultClass \Drupal\automatic_updates\ReadinessChecker\ReadOnlyFilesystem

Namespace

Drupal\Tests\automatic_updates\Kernel\ReadinessChecker

Code

public function testNoWebRoot($files) {
  vfsStream::setup('root');
  vfsStream::create($files);
  $readOnly = new ReadOnlyFilesystem(vfsStream::url('root'), $this
    ->prophesize(LoggerInterface::class)
    ->reveal(), $this
    ->prophesize(FileSystemInterface::class)
    ->reveal());
  $this
    ->assertEquals([
    'The web root could not be located.',
  ], $readOnly
    ->run());
}