function AnnounceFeedTestInvalidJsonTestCase::setUp

Overrides DrupalWebTestCase::setUp

File

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

Class

AnnounceFeedTestInvalidJsonTestCase
Tests the announcements feed with invalid 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->unknownJson = $base_url . '/announcements-feed-json/unknown';
    $this->invalidJson = $base_url . '/announcements-feed-json/invalid-feeds';
    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.