function AnnounceFeedTestValidateJsonFeed::testAnnounceFeedEmpty

Check the status of the feed with an empty JSON feed.

File

modules/announcements_feed/tests/announce_feed_test.test, line 103

Class

AnnounceFeedTestValidateJsonFeed
Tests for validating JSON feed with different JSON URLs.

Code

public function testAnnounceFeedEmpty() {
  // Change the feed URL to empty JSON file.
  variable_set('announcements_feed_json_url', $this->emptyJson);
  cache_clear_all('announcements_feed', 'cache', TRUE);
  $this->drupalLogin($this->user);
  // Only no announcements available message should show.
  $this->clickLink('Announcements');
  $this->assertText('No announcements available');
}

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