function AnnounceFeedTestValidateJsonFeed::testAnnounceFeedUpdatedAndRemoved
Testing the feed with Updated and Removed JSON feeds.
File
-
modules/
announcements_feed/ tests/ announce_feed_test.test, line 78
Class
- AnnounceFeedTestValidateJsonFeed
- Tests for validating JSON feed with different JSON URLs.
Code
public function testAnnounceFeedUpdatedAndRemoved() {
$this->drupalLogin($this->user);
$this->drupalGet('');
$this->clickLink('Announcements');
variable_set('announcements_feed_json_url', $this->updatedJson);
cache_clear_all('announcements_feed', 'cache', TRUE);
$this->drupalGet('admin/announcements_feed');
$this->assertText('Only 9 - Drupal 106 is available and this feed is Updated');
$this->drupalLogout();
// Testing the removed JSON feed.
$this->drupalLogin($this->user);
$this->drupalGet('');
$this->clickLink('Announcements');
variable_set('announcements_feed_json_url', $this->removed);
cache_clear_all('announcements_feed', 'cache', TRUE);
$this->drupalGet('admin/announcements_feed');
$this->assertNoText('Only 9 - Drupal 106 is available and this feed is Updated');
$this->drupalLogout();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.