function AlertsJsonFeedTest::testAnnounceFeedEmpty
Same name in other branches
- 10 core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php \Drupal\Tests\announcements_feed\FunctionalJavascript\AlertsJsonFeedTest::testAnnounceFeedEmpty()
Check with an empty JSON feed.
File
-
core/
modules/ announcements_feed/ tests/ src/ FunctionalJavascript/ AlertsJsonFeedTest.php, line 91
Class
- AlertsJsonFeedTest
- Test the access announcement according to json feed changes.
Namespace
Drupal\Tests\announcements_feed\FunctionalJavascriptCode
public function testAnnounceFeedEmpty() : void {
// Change the feed url and reset temp storage.
AnnounceTestHttpClientMiddleware::setAnnounceTestEndpoint('/announce-feed-json/empty');
$this->drupalLogin($this->user);
$this->drupalGet('<front>');
// Removed items should not display in the announcement model.
$this->clickLink('Announcements');
$this->waitForOffCanvasToOpen();
$this->assertStringContainsString('No announcements available', $this->getSession()
->getPage()
->getHtml());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.