You are here

public function GoogleNewsBasicsTestCase::testSettings in Google News sitemap 7

Check the main admin form.

File

tests/GoogleNewsBasicsTestCase.test, line 27
Test basic functionality of GoogleNews.

Class

GoogleNewsBasicsTestCase
Test basic functionality of GoogleNews.

Code

public function testSettings() {

  // Load the front page.
  $this
    ->drupalGet('admin/config/search/googlenews');
  $this
    ->assertResponse(200);

  // Confirm expected fields are presented.
  $this
    ->assertText('Settings for controlling the');
  $this
    ->assertText('There are currently 0 node(s) suitable for output.');
  $this
    ->assertFieldByName('googlenews_publication_name');
  $this
    ->assertFieldByName('googlenews_cache_timeout');
  $this
    ->assertFieldByName('googlenews_content_hours');
  $this
    ->assertFieldByName('googlenews_base_url');
  foreach (node_type_get_names() as $name => $label) {
    $this
      ->assertFieldByName('googlenews_node_types[' . $name . ']');
  }
}