You are here

public function SettingsTest::testConfigDirectoriesBcLayerEmpty in Drupal 8

@runInSeparateProcess @group legacy

File

core/tests/Drupal/Tests/Core/Site/SettingsTest.php, line 214

Class

SettingsTest
@coversDefaultClass \Drupal\Core\Site\Settings @group Site

Namespace

Drupal\Tests\Core\Site

Code

public function testConfigDirectoriesBcLayerEmpty() {
  global $config_directories;
  $class_loader = NULL;
  $vfs_root = vfsStream::setup('root');
  $sites_directory = vfsStream::newDirectory('sites')
    ->at($vfs_root);
  vfsStream::newFile('settings.php')
    ->at($sites_directory)
    ->setContent(<<<'EOD'
<?php
$settings = [];
EOD
);
  Settings::initialize(vfsStream::url('root'), 'sites', $class_loader);
  $this
    ->assertNull(Settings::get('config_sync_directory'));
  $this
    ->assertNull($config_directories);
}