function MenuLinkContentResourceTestBase::getNormalizedPostEntity

Same name in other branches
  1. 9 core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php \Drupal\Tests\menu_link_content\Functional\Rest\MenuLinkContentResourceTestBase::getNormalizedPostEntity()
  2. 10 core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php \Drupal\Tests\menu_link_content\Functional\Rest\MenuLinkContentResourceTestBase::getNormalizedPostEntity()
  3. 11.x core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php \Drupal\Tests\menu_link_content\Functional\Rest\MenuLinkContentResourceTestBase::getNormalizedPostEntity()

Overrides EntityResourceTestBase::getNormalizedPostEntity

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

File

core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php, line 82

Class

MenuLinkContentResourceTestBase
ResourceTestBase for MenuLinkContent entity.

Namespace

Drupal\Tests\menu_link_content\Functional\Rest

Code

protected function getNormalizedPostEntity() {
    return [
        'title' => [
            [
                'value' => 'Dramallama',
            ],
        ],
        'link' => [
            [
                'uri' => 'http://www.urbandictionary.com/define.php?term=drama%20llama',
                'options' => [
                    'fragment' => 'a-fragment',
                    'attributes' => [
                        'class' => [
                            'example-class',
                        ],
                    ],
                ],
            ],
        ],
        'bundle' => [
            [
                'value' => 'menu_link_content',
            ],
        ],
    ];
}

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