protected function ItemResourceTestBase::getExpectedNormalizedEntity in Drupal 8
Same name and namespace in other branches
- 9 core/modules/aggregator/tests/src/Functional/Rest/ItemResourceTestBase.php \Drupal\Tests\aggregator\Functional\Rest\ItemResourceTestBase::getExpectedNormalizedEntity()
Returns the expected normalization of the entity.
Return value
array
Overrides EntityResourceTestBase::getExpectedNormalizedEntity
See also
::createEntity()
1 call to ItemResourceTestBase::getExpectedNormalizedEntity()
- ItemHalJsonTestBase::getExpectedNormalizedEntity in core/
modules/ aggregator/ tests/ src/ Functional/ Hal/ ItemHalJsonTestBase.php - Returns the expected normalization of the entity.
1 method overrides ItemResourceTestBase::getExpectedNormalizedEntity()
- ItemHalJsonTestBase::getExpectedNormalizedEntity in core/
modules/ aggregator/ tests/ src/ Functional/ Hal/ ItemHalJsonTestBase.php - Returns the expected normalization of the entity.
File
- core/
modules/ aggregator/ tests/ src/ Functional/ Rest/ ItemResourceTestBase.php, line 98
Class
- ItemResourceTestBase
- ResourceTestBase for Item entity.
Namespace
Drupal\Tests\aggregator\Functional\RestCode
protected function getExpectedNormalizedEntity() {
$feed = Feed::load($this->entity
->getFeedId());
return [
'iid' => [
[
'value' => 1,
],
],
'langcode' => [
[
'value' => 'en',
],
],
'fid' => [
[
'target_id' => 1,
'target_type' => 'aggregator_feed',
'target_uuid' => $feed
->uuid(),
'url' => base_path() . 'aggregator/sources/1',
],
],
'title' => [
[
'value' => 'Llama',
],
],
'link' => [
[
'value' => 'https://www.drupal.org/',
],
],
'author' => [],
'description' => [],
'timestamp' => [
$this
->formatExpectedTimestampItemValues(123456789),
],
'guid' => [],
];
}