You are here

public function FeedsTamperTemporaryTargetTestCase::testAddBlankSources in Feeds Tamper 7

Tests adding blank sources.

File

tests/temporary_target.test, line 50

Class

FeedsTamperTemporaryTargetTestCase
Tests blank sources and temporary targets.

Code

public function testAddBlankSources() {
  $importer_name = $this
    ->randomName();
  $importer_id = drupal_strtolower($importer_name);

  // Set up an importer.
  $this
    ->createImporterConfiguration($importer_name, $importer_id);

  // Add three blank sources.
  $this
    ->addMappings($importer_id, array(
    0 => array(
      'source' => 'Blank source 1',
      'target' => 'title',
    ),
    1 => array(
      'source' => 'Blank source 2',
      'target' => 'guid',
    ),
    2 => array(
      'source' => 'Blank source 3',
      'target' => 'body',
    ),
  ));

  // Assert that all sources are displayed in the UI.
  $this
    ->assertText('Blank source 1');
  $this
    ->assertText('Blank source 2');
  $this
    ->assertText('Blank source 3');
}