public function ReversibleConfigDifferTest::sameDataProvider in Update helper 2.x
Same name and namespace in other branches
- 8 tests/src/Kernel/ReversibleConfigDifferTest.php \Drupal\Tests\update_helper\Kernel\ReversibleConfigDifferTest::sameDataProvider()
Data provider for testing of same() method.
Important part is that 'uuid' and '_core' are stripped only for base configuration array, not in nested configuration parts.
Return value
array Test data with full name + type and name of configuration.
File
- tests/
src/ Kernel/ ReversibleConfigDifferTest.php, line 53
Class
- ReversibleConfigDifferTest
- Automated tests for ReversibleConfigDiffer class.
Namespace
Drupal\Tests\update_helper\KernelCode
public function sameDataProvider() {
return [
[
[
'uuid' => '1234-5678-90',
'_core' => 'core_id_1',
'id' => 'test.config.id',
'short_text' => 'en',
'long_text' => 'Automated tests for the ConfigDiffTransformer service.',
'true_value' => TRUE,
'false_value' => FALSE,
'nested_array' => [
'flat_array' => [
'value2',
'value1',
'value3',
],
'custom_key' => 'value',
],
'1234-5678-90' => [
'uuid' => '1234-5678-90',
],
'empty_array' => [],
'empty_string' => '',
'null_value' => NULL,
],
[
'uuid' => '09-8765-4321',
'_core' => 'core_id_2',
'id' => 'test.config.id',
'short_text' => 'en',
'long_text' => 'Automated tests for the ConfigDiffTransformer service.',
'true_value' => TRUE,
'false_value' => FALSE,
'nested_array' => [
'flat_array' => [
'value2',
'value1',
'value3',
],
'custom_key' => 'value',
],
'1234-5678-90' => [
'uuid' => '1234-5678-90',
],
'empty_array' => [],
'empty_string' => '',
'null_value' => NULL,
],
TRUE,
],
[
[
'uuid' => '1234-5678-90',
'_core' => 'core_id_1',
'id' => 'test.config.id',
'short_text' => 'en',
'long_text' => 'Automated tests for the ConfigDiffTransformer service.',
'true_value' => TRUE,
'false_value' => FALSE,
'nested_array' => [
'flat_array' => [
'value2',
'value1',
'value3',
],
'custom_key' => 'value',
],
'1234-5678-90' => [
'uuid' => '1234-5678-90',
],
'empty_array' => [],
'empty_string' => '',
'null_value' => NULL,
],
[
'uuid' => '09-8765-4321',
'_core' => 'core_id_2',
'id' => 'test.config.id',
'short_text' => 'en',
'long_text' => 'Automated tests for the ConfigDiffTransformer service.',
'true_value' => TRUE,
'false_value' => FALSE,
'nested_array' => [
'flat_array' => [
'value2',
'value1',
'value3',
],
'custom_key' => 'value',
],
'1234-5678-90' => [
'uuid' => '09-8765-4321',
],
'empty_array' => [],
'empty_string' => '',
'null_value' => NULL,
],
FALSE,
],
];
}