public function ConfigReverterTest::getFromExtensionProvider in Configuration Update Manager 8
Data provider for self:testGetFromExtension().
File
- tests/
src/ Unit/ ConfigReverterTest.php, line 80
Class
- ConfigReverterTest
- Tests the \Drupal\config_update\ConfigReverter class.
Namespace
Drupal\Tests\config_update\UnitCode
public function getFromExtensionProvider() {
return [
// Arguments are $type, $name, and return value is the config.
// Some config items that are already prefixed, and exist in the mock
// extension storage.
[
'',
'in.extension',
[
'in.extension' => 'extension',
],
],
[
'system.simple',
'in.extension',
[
'in.extension' => 'extension',
],
],
// Config item with a defined entity definition prefix. Entity type 'foo'
// has prefix 'foo.bar'.
[
'foo',
'one',
[
'foo.bar.one' => 'extension',
'id' => 'one',
],
],
// One that exists in both extension and optional storage.
[
'system.simple',
'in.both',
[
'in.both' => 'extension',
],
],
// One that exists only in optional storage.
[
'system.simple',
'in.optional',
[
'in.optional' => 'optional',
],
],
// Unknown type. This should not generate a call into the config read,
// so should not return the known value.
[
'unknown',
'in.extension',
FALSE,
],
// Missing configuration. Storage mock is configured to return FALSE for
// this particular config name.
[
'system.simple',
'missing2',
FALSE,
],
];
}