You are here

public function FeedsSchedulerTestCase::testSchedulingWithDisabledImporter in Feeds 7.2

Test scheduling of disabled import on cron.

File

tests/feeds_scheduler.test, line 27
Feeds tests.

Class

FeedsSchedulerTestCase
Test cron scheduling.

Code

public function testSchedulingWithDisabledImporter() {

  // Initialize scheduling.
  $init = $this
    ->initSyndication();

  // Disable syndication feed so cron doesn't import nodes.
  $this
    ->drupalLogin($this->admin_user);
  $edit = array(
    'syndication' => FALSE,
  );
  $this
    ->drupalPost('admin/structure/feeds', $edit, 'Save');
  $this
    ->drupalLogout();
  $this
    ->cronRun();
  $this
    ->cronRun();

  // There should be 0 article nodes in the database.
  $count = db_query("SELECT COUNT(*) FROM {node} WHERE type = 'article' AND status = 1")
    ->fetchField();
  $this
    ->assertEqual($count, 0, 'There are 0 article nodes aggregated.');
}