function SettingsTest::testConfigDirectoriesBcLayerMultiple

@runInSeparateProcess @group legacy

File

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

Class

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

Namespace

Drupal\Tests\Core\Site

Code

public function testConfigDirectoriesBcLayerMultiple() {
    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['config_sync_directory'] = 'foo';
$config_directories['sync'] = 'bar';
$config_directories['custom'] = 'custom';
EOD
);
    Settings::initialize(vfsStream::url('root'), 'sites', $class_loader);
    $this->assertSame('foo', Settings::get('config_sync_directory'));
    $this->assertSame('foo', $config_directories['sync']);
    $this->assertSame('custom', $config_directories['custom']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.