You are here

public function ConfigReverterTest::getFromActiveProvider in Configuration Update Manager 8

Data provider for self:testGetFromActive().

File

tests/src/Unit/ConfigReverterTest.php, line 49

Class

ConfigReverterTest
Tests the \Drupal\config_update\ConfigReverter class.

Namespace

Drupal\Tests\config_update\Unit

Code

public function getFromActiveProvider() {
  return [
    // Arguments are $type, $name, and return value is the config.
    // Some config items that are already prefixed.
    [
      '',
      'foo.bar.one',
      [
        'foo.bar.one' => 'active',
        'id' => 'one',
      ],
    ],
    [
      'system.simple',
      'foo.bar.one',
      [
        'foo.bar.one' => 'active',
        'id' => 'one',
      ],
    ],
    // Config item with a defined entity definition prefix. Entity type 'foo'
    // has prefix 'foo.bar'.
    [
      'foo',
      'one',
      [
        'foo.bar.one' => 'active',
        'id' => 'one',
      ],
    ],
    // Unknown type. This should not generate a call into the config read,
    // so should not return the known value.
    [
      'unknown',
      'foo.bar.one',
      FALSE,
    ],
    // Missing configuration. Config mock is configured to return FALSE for
    // this particular config name.
    [
      'system.simple',
      'missing',
      FALSE,
    ],
  ];
}