You are here

protected function ShortcutResourceTestBase::getNormalizedPostEntity in Drupal 8

Same name and namespace in other branches
  1. 9 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

See also

::testPost

1 call to ShortcutResourceTestBase::getNormalizedPostEntity()
ShortcutHalJsonAnonTest::getNormalizedPostEntity in core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonAnonTest.php
Returns the normalized POST entity.
1 method overrides ShortcutResourceTestBase::getNormalizedPostEntity()
ShortcutHalJsonAnonTest::getNormalizedPostEntity in core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonAnonTest.php
Returns the normalized POST entity.

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',
      ],
    ],
  ];
}