function AnnounceFetcherTest::testShowAnnouncements
Tests announcement that should be displayed.
@dataProvider providerShowAnnouncements
Parameters
mixed[] $feed_item: The feed item to test. 'title' and 'url' are omitted from this array because they do not need to vary between test cases.
File
- 
              core/modules/ announcements_feed/ tests/ src/ Kernel/ AnnounceFetcherTest.php, line 33 
Class
- AnnounceFetcherTest
- @coversDefaultClass \Drupal\announcements_feed\AnnounceFetcher[[api-linebreak]]
Namespace
Drupal\Tests\announcements_feed\KernelCode
public function testShowAnnouncements(array $feed_item) : void {
  $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322');
  $this->setFeedItems([
    $feed_item,
  ]);
  $feeds = $this->fetchFeedItems();
  $this->assertCount(1, $feeds);
  $this->assertSame('https://www.drupal.org/project/announce', $feeds[0]->url);
  $this->assertSame('Drupal security update Test', $feeds[0]->title);
  $this->assertSame('^10', $feeds[0]->version);
  $this->assertCount(1, $this->history);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
