protected function setFeedItems(array
$feed_items): void
{ $responses =
[];
foreach ($feed_items as $feed_item) { $feed_item +=
[ 'title' => 'Drupal security update Test',
'url' => 'https://www.drupal.org/project/announce',
];
$responses[] =
new Response(200,
[],
json_encode(['items' =>
[$feed_item]]));
} $this->
setTestFeedResponses($responses);
} /**
* Gets the announcements from the 'announce.fetcher' service.
*
* @return \Drupal\announcements_feed\Announcement[]
* The return value of AnnounceFetcher::fetch().
*/
protected function fetchFeedItems(): array
{ return $this->container->
get('announcements_feed.fetcher'
)->
fetch();
}}