function FeedResourceTestBase::getExpectedNormalizedEntity

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

Overrides EntityResourceTestBase::getExpectedNormalizedEntity

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

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