You are here

protected function ViewResourceTestBase::getExpectedNormalizedEntity in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Functional/Rest/ViewResourceTestBase.php \Drupal\Tests\views\Functional\Rest\ViewResourceTestBase::getExpectedNormalizedEntity()

Returns the expected normalization of the entity.

Return value

array

Overrides EntityResourceTestBase::getExpectedNormalizedEntity

See also

::createEntity()

File

core/modules/views/tests/src/Functional/Rest/ViewResourceTestBase.php, line 47

Class

ViewResourceTestBase

Namespace

Drupal\Tests\views\Functional\Rest

Code

protected function getExpectedNormalizedEntity() {
  return [
    'base_field' => 'nid',
    'base_table' => 'node',
    'dependencies' => [],
    'description' => '',
    'display' => [
      'default' => [
        'display_plugin' => 'default',
        'id' => 'default',
        'display_title' => 'Master',
        'position' => 0,
        'display_options' => [
          'display_extenders' => [],
        ],
        'cache_metadata' => [
          'max-age' => -1,
          'contexts' => [
            'languages:language_interface',
            'url.query_args',
          ],
          'tags' => [],
        ],
      ],
    ],
    'id' => 'test_rest',
    'label' => 'Test REST',
    'langcode' => 'en',
    'module' => 'views',
    'status' => TRUE,
    'tag' => '',
    'uuid' => $this->entity
      ->uuid(),
  ];
}