function ImportOPMLTestCase::openImportForm

Opens OPML import form.

2 calls to ImportOPMLTestCase::openImportForm()
ImportOPMLTestCase::testOPMLImport in drupal-7.x/modules/aggregator/aggregator.test
Tests the import of an OPML file.
ImportOPMLTestCase::testOPMLImport in drupal-7.x/modules/aggregator/aggregator.test
Tests the import of an OPML file.

Archivo

drupal-7.x/modules/aggregator/aggregator.test, line 704
Tests for aggregator.module.

Class

ImportOPMLTestCase
Tests importing feeds from OPML functionality for the Aggregator module.

Código

function openImportForm() {
  db_delete('aggregator_category')->execute();

  $category = $this->randomName(10);
  $cid = db_insert('aggregator_category')->fields(array(
    'title' => $category,
    'description' => '',
  ))->execute();

  $this->drupalGet('admin/config/services/aggregator/add/opml');
  $this->assertText('A single OPML document may contain a collection of many feeds.', 'Found OPML help text.');
  $this->assertField('files[upload]', 'Found file upload field.');
  $this->assertField('remote', 'Found Remote URL field.');
  $this->assertField('refresh', 'Found Refresh field.');
  $this->assertFieldByName("category[$cid]", $cid, 'Found category field.');
}