public function IgnoreKernelTest::importProvider in Config Ignore 8.2
Same name and namespace in other branches
- 8.3 tests/src/Kernel/IgnoreKernelTest.php \Drupal\Tests\config_ignore\Kernel\IgnoreKernelTest::importProvider()
Provides the test cases for the import.
Return value
array The test case.
File
- tests/
src/ Kernel/ IgnoreKernelTest.php, line 82
Class
- IgnoreKernelTest
- Test the transformations.
Namespace
Drupal\Tests\config_ignore\KernelCode
public function importProvider() {
return [
'empty test' => [
// Modes, these are not implemented yet.
[],
// The ignore config.
[],
// Modifications to the active config keyed by language.
[],
// Modifications to the sync config keyed by language.
[],
// Modifications to the expected config keyed by language.
[],
],
'keep config deleted in sync' => [
[],
[
'config_test.system',
],
[],
[
// Delete the config_test.system from all languages in sync storage.
'' => [
'config_test.system' => FALSE,
],
'de' => [
'config_test.system' => FALSE,
],
'fr' => [
'config_test.system' => FALSE,
],
],
[],
],
'remove translation when not ignored' => [
[],
[
'config_test.system',
],
[
'de' => [
'config_test.no_status.default' => [
'label' => 'DE default',
],
],
],
[],
[],
],
'do not remove translation when ignored' => [
[],
[
'config_test.system',
],
[
'de' => [
'config_test.system' => [
'foo' => 'Neues Foo',
],
],
],
[],
[
'de' => [
'config_test.system' => [
'foo' => 'Neues Foo',
],
],
],
],
'do not remove translation when key is ignored' => [
[],
[
'config_test.system:foo',
],
[
'de' => [
'config_test.system' => [
'foo' => 'Neues Foo',
],
],
],
[],
[
'de' => [
'config_test.system' => [
'foo' => 'Neues Foo',
],
],
],
],
'remove translation when other key is ignored' => [
[],
[
'config_test.system:404',
],
[
'de' => [
'config_test.system' => [
'foo' => 'Neues Foo',
],
],
],
[],
[],
],
'new translation is ignored' => [
[
'strict',
],
[
'config_test.*',
],
[],
[
'se' => [
'config_test.system' => [
'foo' => 'Ny foo',
],
],
],
[],
],
'new config is ignored' => [
[
'strict',
],
[
'config_test.*',
],
[
'' => [
'config_test.dynamic.exist' => [
'id' => 'exist',
'label' => 'E',
],
],
],
[
'' => [
'config_test.dynamic.exist' => [
'id' => 'exist',
'label' => 'N',
],
'config_test.dynamic.new' => [
'id' => 'new',
'label' => 'N',
],
'config_test.system' => [
'foo' => 'ignored',
],
],
],
[
'' => [
'config_test.dynamic.exist' => [
'id' => 'exist',
'label' => 'E',
],
],
],
],
// 'new config is not ignored in lenient mode' => [
// ['lenient'],
// ['config_test.*'],
// [
// '' => [
// 'config_test.dynamic.exist' => ['id' => 'exist', 'label' => 'E'],
// ],
// ],
// [
// '' => [
// 'config_test.dynamic.exist' => ['id' => 'exist', 'label' => 'N'],
// 'config_test.dynamic.new' => ['id' => 'new', 'label' => 'N'],
// 'config_test.system' => ['foo' => 'ignored']
// ],
// ],
// [
// '' => [
// 'config_test.dynamic.exist' => ['id' => 'exist', 'label' => 'E'],
// 'config_test.dynamic.new' => ['id' => 'new', 'label' => 'N'],
// ],
// ],
// ],
'new config with only key ignored (issue 3137437)' => [
[
'strict',
],
[
'config_test.*:label',
],
[
'' => [
'config_test.dynamic.exist' => [
'id' => 'exist',
'label' => 'E',
],
],
],
[],
[],
],
];
}