function FileCacheFactoryTest::configurationDataProvider

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php \Drupal\Tests\Component\FileCache\FileCacheFactoryTest::configurationDataProvider()
  2. 8.9.x core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php \Drupal\Tests\Component\FileCache\FileCacheFactoryTest::configurationDataProvider()
  3. 10 core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php \Drupal\Tests\Component\FileCache\FileCacheFactoryTest::configurationDataProvider()

Data provider for testGetConfigurationOverrides().

File

core/tests/Drupal/Tests/Component/FileCache/FileCacheFactoryTest.php, line 101

Class

FileCacheFactoryTest
@coversDefaultClass \Drupal\Component\FileCache\FileCacheFactory @group FileCache

Namespace

Drupal\Tests\Component\FileCache

Code

public static function configurationDataProvider() {
    $data = [];
    // Test fallback configuration.
    $data['fallback-configuration'] = [
        [],
        [],
        FileCache::class,
    ];
    // Test default configuration.
    $data['default-configuration'] = [
        [
            'default' => [
                'class' => CustomFileCache::class,
            ],
        ],
        [],
        CustomFileCache::class,
    ];
    // Test specific per collection setting.
    $data['collection-setting'] = [
        [
            'test_foo_settings' => [
                'class' => CustomFileCache::class,
            ],
        ],
        [],
        CustomFileCache::class,
    ];
    // Test default configuration plus specific per collection setting.
    $data['default-plus-collection-setting'] = [
        [
            'default' => [
                'class' => '\\stdClass',
            ],
            'test_foo_settings' => [
                'class' => CustomFileCache::class,
            ],
        ],
        [],
        CustomFileCache::class,
    ];
    // Test default configuration plus class specific override.
    $data['default-plus-class-override'] = [
        [
            'default' => [
                'class' => '\\stdClass',
            ],
        ],
        [
            'class' => CustomFileCache::class,
        ],
        CustomFileCache::class,
    ];
    // Test default configuration plus class specific override plus specific
    // per collection setting.
    $data['default-plus-class-plus-collection-setting'] = [
        [
            'default' => [
                'class' => '\\stdClass',
            ],
            'test_foo_settings' => [
                'class' => CustomFileCache::class,
            ],
        ],
        [
            'class' => '\\stdClass',
        ],
        CustomFileCache::class,
    ];
    return $data;
}

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