function AnnounceFeedTestValidateJsonFeed::setUp

Overrides DrupalWebTestCase::setUp

File

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

Class

AnnounceFeedTestValidateJsonFeed
Tests for validating JSON feed with different JSON URLs.

Code

public function setUp() {
    global $base_url;
    module_load_include('inc', 'announce_feed_test', 'announce_feed_test');
    parent::setUp('user', 'toolbar', 'announcements_feed', 'announce_feed_test');
    $this->user = $this->drupalCreateUser(array(
        'access toolbar',
        'access announcements',
    ));
    $this->drupalLogin($this->user);
    $this->responseJson = $base_url . '/announcements-feed-json/community-feeds';
    $this->updatedJson = $base_url . '/announcements-feed-json/updated';
    $this->emptyJson = $base_url . '/announcements-feed-json/empty';
    $this->removed = $base_url . '/announcements-feed-json/removed';
    variable_set('announcements_feed_json_url', $this->responseJson);
}

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