You are here

public function ContextTestTrait::testMapping in Feeds extensible parsers 8

Does a basic mapping test.

File

tests/src/Functional/Feeds/Parser/ContextTestTrait.php, line 71

Class

ContextTestTrait
Trait for testing the context field on the mapping form.

Namespace

Drupal\Tests\feeds_ex\Functional\Feeds\Parser

Code

public function testMapping() {

  // First, set context.
  $data = $this
    ->dataProviderValidContext();
  $contexts = reset($data);
  $context = reset($contexts);
  $edit = [
    'context' => $context,
  ];
  $this
    ->drupalPostForm('/admin/structure/feeds/manage/' . $this->feedType
    ->id() . '/mapping', $edit, 'Save');

  // Now set mapping.
  $this
    ->doMappingTest();
}