public function LayoutBuilderIntegrationTest::provider in Core Context 8
Data provider for ::test().
Return value
array The sets of arguments to pass to ::test().
File
- tests/
src/ Functional/ LayoutBuilderIntegrationTest.php, line 62
Class
- LayoutBuilderIntegrationTest
- @group core_context
Namespace
Drupal\Tests\core_context\FunctionalCode
public function provider() {
return [
'context values in third-party entity display settings' => [
'block_configuration' => [
'id' => 'context_block',
'context_mapping' => [
'value' => '@core_context:value',
'letter' => '@core_context:letter',
],
],
'layout_overridable' => FALSE,
'third_party_contexts' => [
'value' => [
'type' => 'integer',
'label' => 'Holy computer number',
'description' => 'A convenient power of two',
'value' => 512,
],
'letter' => [
'type' => 'string',
'label' => 'Sponsoring letter',
'description' => 'A letter of the NATO phonetic alphabet',
'value' => 'Charlie',
],
],
'entity_values' => [],
],
'context values in third-party entity display settings, without mapping' => [
'block_configuration' => [
'id' => 'context_block_optional',
],
'layout_overridable' => FALSE,
'third_party_contexts' => [
'value' => [
'type' => 'integer',
'label' => 'Holy computer number',
'description' => 'A convenient power of two',
'value' => 512,
],
'letter' => [
'type' => 'string',
'label' => 'Sponsoring letter',
'description' => 'A letter of the NATO phonetic alphabet',
'value' => 'Charlie',
],
],
'entity_values' => [],
],
'context values in entity field' => [
'block_configuration' => [
'id' => 'context_block',
'context_mapping' => [
'value' => '@core_context:value',
'letter' => '@core_context:letter',
],
],
'layout_overridable' => TRUE,
'third_party_contexts' => [],
'entity_values' => [
'context' => [
[
'id' => 'value',
'type' => 'integer',
'label' => 'Holy computer number',
'description' => 'A convenient power of two',
'value' => 512,
],
[
'id' => 'letter',
'type' => 'string',
'label' => 'Sponsoring letter',
'description' => 'A letter of the NATO phonetic alphabet',
'value' => 'Charlie',
],
],
],
],
'context values in entity field, without mapping' => [
'block_configuration' => [
'id' => 'context_block_optional',
],
'layout_overridable' => TRUE,
'third_party_contexts' => [],
'entity_values' => [
'context' => [
[
'id' => 'value',
'type' => 'integer',
'label' => 'Holy computer number',
'description' => 'A convenient power of two',
'value' => 512,
],
[
'id' => 'letter',
'type' => 'string',
'label' => 'Sponsoring letter',
'description' => 'A letter of the NATO phonetic alphabet',
'value' => 'Charlie',
],
],
],
],
'context values in entity field and third-party entity display settings, without mapping' => [
'block_configuration' => [
'id' => 'context_block_optional',
],
'layout_overridable' => TRUE,
'third_party_contexts' => [
'value' => [
'type' => 'integer',
'label' => 'Holy computer number',
'description' => 'A convenient power of two',
'value' => 512,
],
],
'entity_values' => [
'context' => [
[
'id' => 'letter',
'type' => 'string',
'label' => 'Sponsoring letter',
'description' => 'A letter of the NATO phonetic alphabet',
'value' => 'Charlie',
],
],
],
],
'context values in block plugin configuration' => [
'block_configuration' => [
'id' => 'context_block',
'context' => [
'value' => 512,
'letter' => 'Charlie',
],
],
'layout_overridable' => FALSE,
'third_party_contexts' => [],
'entity_values' => [],
],
];
}