You are here

public function FeedsUIUserInterfaceTestCase::testWarningPeriodicImportAndImportOnSubmissionTurnedOff in Feeds 7.2

Tests if the user is warned when having both "Import on submission" and "Periodic import" turned off.

File

feeds_ui/feeds_ui.test, line 219
Tests for Feeds Admin UI module.

Class

FeedsUIUserInterfaceTestCase
Test basic Feeds UI functionality.

Code

public function testWarningPeriodicImportAndImportOnSubmissionTurnedOff() {

  // Create an importer.
  $this
    ->createImporterConfiguration('Test feed', 'test_feed');
  $this
    ->setSettings('test_feed', NULL, array(
    'content_type' => '',
    'import_period' => FEEDS_SCHEDULE_NEVER,
    'import_on_create' => FALSE,
  ));

  // Assert error message.
  $this
    ->assertText(t('"@import_period" and "@import_on_create" are both turned off and the importer is not attached to a content type. Unless you have alternative methods of running imports for this importer, Feeds will not import anything for this importer.', array(
    '@import_period' => t('Periodic import'),
    '@import_on_create' => t('Import on submission'),
  )));
}