function ReadOnlyStorageTest::readMethodsProvider

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php \Drupal\Tests\Core\Config\ReadOnlyStorageTest::readMethodsProvider()
  2. 10 core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php \Drupal\Tests\Core\Config\ReadOnlyStorageTest::readMethodsProvider()
  3. 11.x core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php \Drupal\Tests\Core\Config\ReadOnlyStorageTest::readMethodsProvider()

Provide the methods that work transparently.

Return value

array The data.

File

core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php, line 65

Class

ReadOnlyStorageTest
@coversDefaultClass \Drupal\Core\Config\ReadOnlyStorage @group Config

Namespace

Drupal\Tests\Core\Config

Code

public function readMethodsProvider() {
    $fixture = [
        StorageInterface::DEFAULT_COLLECTION => [
            'config.a',
            'config.b',
            'other.a',
        ],
    ];
    $data = [];
    $data[] = [
        'exists',
        [
            'config.a',
        ],
        $fixture,
    ];
    $data[] = [
        'exists',
        [
            'not.existing',
        ],
        $fixture,
    ];
    $data[] = [
        'read',
        [
            'config.a',
        ],
        $fixture,
    ];
    $data[] = [
        'read',
        [
            'not.existing',
        ],
        $fixture,
    ];
    $data[] = [
        'readMultiple',
        [
            [
                'config.a',
                'config.b',
                'not',
            ],
        ],
        $fixture,
    ];
    $data[] = [
        'listAll',
        [
            '',
        ],
        $fixture,
    ];
    $data[] = [
        'listAll',
        [
            'config',
        ],
        $fixture,
    ];
    $data[] = [
        'listAll',
        [
            'none',
        ],
        $fixture,
    ];
    return $data;
}

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