function StorageComparerTest::getConfigData

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php \Drupal\Tests\Core\Config\StorageComparerTest::getConfigData()
  2. 8.9.x core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php \Drupal\Tests\Core\Config\StorageComparerTest::getConfigData()
  3. 11.x core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php \Drupal\Tests\Core\Config\StorageComparerTest::getConfigData()
4 calls to StorageComparerTest::getConfigData()
StorageComparerTest::testCreateChangelistCreate in core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
@covers ::createChangelist
StorageComparerTest::testCreateChangelistDelete in core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
@covers ::createChangelist
StorageComparerTest::testCreateChangelistNoChange in core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
@covers ::createChangelist
StorageComparerTest::testCreateChangelistUpdate in core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php
@covers ::createChangelist

File

core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php, line 62

Class

StorageComparerTest
@coversDefaultClass \Drupal\Core\Config\StorageComparer @group Config

Namespace

Drupal\Tests\Core\Config

Code

protected function getConfigData() {
    $uuid = new Php();
    // Mock data using minimal data to use ConfigDependencyManger.
    $this->configData = [
        // Simple config that controls configuration sync.
'system.site' => [
            'title' => 'Drupal',
            'uuid' => $uuid->generate(),
        ],
        // Config entity which requires another config entity.
'field.field.node.article.body' => [
            'id' => 'node.article.body',
            'uuid' => $uuid->generate(),
            'dependencies' => [
                'config' => [
                    'field.storage.node.body',
                ],
            ],
        ],
        // Config entity which is required by another config entity.
'field.storage.node.body' => [
            'id' => 'node.body',
            'uuid' => $uuid->generate(),
            'dependencies' => [
                'module' => [
                    'text',
                ],
            ],
        ],
        // Config entity not which has no dependencies on configuration.
'views.view.test_view' => [
            'id' => 'test_view',
            'uuid' => $uuid->generate(),
            'dependencies' => [
                'module' => [
                    'node',
                ],
            ],
        ],
        // Simple config.
'system.performance' => [
            'stale_file_threshold' => 2592000,
        ],
    ];
    return $this->configData;
}

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