function AnnounceFetcherTest::fetchFeedItems

Same name in other branches
  1. 10 core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php \Drupal\Tests\announcements_feed\Kernel\AnnounceFetcherTest::fetchFeedItems()

Gets the announcements from the 'announce.fetcher' service.

Return value

\Drupal\announcements_feed\Announcement[] The return value of AnnounceFetcher::fetch().

2 calls to AnnounceFetcherTest::fetchFeedItems()
AnnounceFetcherTest::testFeedFields in core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php
Tests feed fields.
AnnounceFetcherTest::testShowAnnouncements in core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php
Tests announcement that should be displayed.

File

core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php, line 152

Class

AnnounceFetcherTest
@coversDefaultClass \Drupal\announcements_feed\AnnounceFetcher

Namespace

Drupal\Tests\announcements_feed\Kernel

Code

protected function fetchFeedItems() : array {
    return $this->container
        ->get('announcements_feed.fetcher')
        ->fetch();
}

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