You are here

protected function FeedResourceTestBase::getExpectedNormalizedEntity in Drupal 8

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

Returns the expected normalization of the entity.

Return value

array

Overrides EntityResourceTestBase::getExpectedNormalizedEntity

See also

::createEntity()

1 call to FeedResourceTestBase::getExpectedNormalizedEntity()
FeedHalJsonTestBase::getExpectedNormalizedEntity in core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonTestBase.php
Returns the expected normalization of the entity.
1 method overrides FeedResourceTestBase::getExpectedNormalizedEntity()
FeedHalJsonTestBase::getExpectedNormalizedEntity in core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonTestBase.php
Returns the expected normalization of the entity.

File

core/modules/aggregator/tests/src/Functional/Rest/FeedResourceTestBase.php, line 76

Class

FeedResourceTestBase

Namespace

Drupal\Tests\aggregator\Functional\Rest

Code

protected function getExpectedNormalizedEntity() {
  return [
    'uuid' => [
      [
        'value' => 'abcdefg',
      ],
    ],
    'fid' => [
      [
        'value' => 1,
      ],
    ],
    'langcode' => [
      [
        'value' => 'en',
      ],
    ],
    'url' => [
      [
        'value' => 'http://example.com/rss.xml',
      ],
    ],
    'title' => [
      [
        'value' => 'Feed',
      ],
    ],
    'refresh' => [
      [
        'value' => 900,
      ],
    ],
    'checked' => [
      $this
        ->formatExpectedTimestampItemValues(123456789),
    ],
    'queued' => [
      $this
        ->formatExpectedTimestampItemValues(123456789),
    ],
    'link' => [
      [
        'value' => 'http://example.com',
      ],
    ],
    'description' => [
      [
        'value' => 'Feed Resource Test 1',
      ],
    ],
    'image' => [
      [
        'value' => 'http://example.com/feed_logo',
      ],
    ],
    'hash' => [
      [
        'value' => 'abcdefg',
      ],
    ],
    'etag' => [
      [
        'value' => 'hijklmn',
      ],
    ],
    'modified' => [
      $this
        ->formatExpectedTimestampItemValues(123456789),
    ],
  ];
}