function ShortcutResourceTestBase::getNormalizedPostEntity

Same name and namespace in other branches
  1. 8.9.x core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutResourceTestBase::getNormalizedPostEntity()
  2. 10 core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutResourceTestBase::getNormalizedPostEntity()
  3. 11.x core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutResourceTestBase::getNormalizedPostEntity()

Returns the normalized POST entity.

Return value

array

Overrides EntityResourceTestBase::getNormalizedPostEntity

1 call to ShortcutResourceTestBase::getNormalizedPostEntity()
ShortcutHalJsonAnonTest::getNormalizedPostEntity in core/modules/hal/tests/src/Functional/shortcut/ShortcutHalJsonAnonTest.php
1 method overrides ShortcutResourceTestBase::getNormalizedPostEntity()
ShortcutHalJsonAnonTest::getNormalizedPostEntity in core/modules/hal/tests/src/Functional/shortcut/ShortcutHalJsonAnonTest.php

File

core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php, line 128

Class

ShortcutResourceTestBase
ResourceTestBase for Shortcut entity.

Namespace

Drupal\Tests\shortcut\Functional\Rest

Code

protected function getNormalizedPostEntity() {
  return [
    'title' => [
      [
        'value' => 'Comments',
      ],
    ],
    'link' => [
      [
        'uri' => 'internal:/',
      ],
    ],
    'shortcut_set' => [
      [
        'target_id' => 'default',
      ],
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.