.../Shortcut/ShortcutResourceTestBase.php | 7 ++++++- .../tests/src/Kernel/MapDataNormalizerTest.php | 6 +++--- .../Field/FieldType/{MapItem.php => MapTestItem.php} | 19 ++----------------- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutResourceTestBase.php index 36be5b5..de307e6 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutResourceTestBase.php @@ -58,6 +58,9 @@ protected function createEntity() { 'weight' => -20, 'link' => [ 'uri' => 'internal:/admin/content/comment', + 'options' => [ + 'fragment' => 'new', + ], ], ]); $shortcut->save(); @@ -96,7 +99,9 @@ protected function getExpectedNormalizedEntity() { [ 'uri' => 'internal:/admin/content/comment', 'title' => NULL, - 'options' => [], + 'options' => [ + 'fragment' => 'new', + ], ], ], 'weight' => [ diff --git a/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php b/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php index 20fa9e5..11e3353 100644 --- a/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php +++ b/core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php @@ -120,9 +120,9 @@ protected function buildExampleTypedDataWithProperties() { ->setPropertyDefinition('key2', DataDefinition::create('string')) ->setPropertyDefinition('key3', DataDefinition::create('integer')) ->setPropertyDefinition('key4', MapDataDefinition::create() - ->setPropertyDefinition(0, DataDefinition::create('boolean')) - ->setPropertyDefinition(1, DataDefinition::create('string')) - ->setPropertyDefinition('key7', DataDefinition::create('string')) + ->setPropertyDefinition(0, DataDefinition::create('boolean')) + ->setPropertyDefinition(1, DataDefinition::create('string')) + ->setPropertyDefinition('key7', DataDefinition::create('string')) ); $typed_data = $this->typedDataManager->create( diff --git a/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/MapItem.php b/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/MapTestItem.php similarity index 61% rename from core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/MapItem.php rename to core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/MapTestItem.php index e09fdf7..dfb1295 100644 --- a/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/MapItem.php +++ b/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/MapTestItem.php @@ -4,6 +4,7 @@ use Drupal\Core\Field\FieldItemBase; use Drupal\Core\Field\FieldStorageDefinitionInterface; +use Drupal\Core\Field\Plugin\Field\FieldType\MapItem; use Drupal\Core\TypedData\MapDataDefinition; /** @@ -15,7 +16,7 @@ * description = @Translation("Another dummy field type."), * ) */ -class MapItem extends FieldItemBase { +class MapTestItem extends MapItem { /** * {@inheritdoc} @@ -26,20 +27,4 @@ public static function propertyDefinitions(FieldStorageDefinitionInterface $fiel ]; } - /** - * {@inheritdoc} - */ - public static function schema(FieldStorageDefinitionInterface $field_definition) { - return [ - 'columns' => [ - 'value' => [ - 'description' => 'Serialized array of stuff.', - 'type' => 'blob', - 'size' => 'big', - 'serialize' => TRUE, - ], - ], - ]; - } - }