function SettingsTest::configDirectoriesBcLayerProvider

Data provider for self::testConfigDirectoriesBcLayer().

File

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

Class

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

Namespace

Drupal\Tests\Core\Site

Code

public function configDirectoriesBcLayerProvider() {
    $no_config_directories = <<<'EOD'
<?php
$settings['config_sync_directory'] = 'foo';
EOD;
    $only_config_directories = <<<'EOD'
<?php
$config_directories['sync'] = 'bar';
EOD;
    $both = <<<'EOD'
<?php
$settings['config_sync_directory'] = 'foo';
$config_directories['sync'] = 'bar';
EOD;
    return [
        'Only $settings[\'config_sync_directory\']' => [
            $no_config_directories,
            'foo',
            FALSE,
        ],
        'Only $config_directories' => [
            $only_config_directories,
            'bar',
            TRUE,
        ],
        'Both' => [
            $both,
            'foo',
            FALSE,
        ],
    ];
}

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