You are here

protected function UiCrudTest::setUp in Feeds Tamper 8.2

Same name in this branch
  1. 8.2 tests/src/Functional/UiCrudTest.php \Drupal\Tests\feeds_tamper\Functional\UiCrudTest::setUp()
  2. 8.2 tests/src/FunctionalJavascript/UiCrudTest.php \Drupal\Tests\feeds_tamper\FunctionalJavascript\UiCrudTest::setUp()

Overrides FeedsTamperJavascriptTestBase::setUp

File

tests/src/FunctionalJavascript/UiCrudTest.php, line 36

Class

UiCrudTest
Tests adding/editing/removing tamper plugins using the UI.

Namespace

Drupal\Tests\feeds_tamper\FunctionalJavascript

Code

protected function setUp() {
  parent::setUp();

  // Add body field.
  node_add_body_field($this->nodeType);

  // Add a feed type with mapping to body.
  $this->feedType = $this
    ->createFeedType([
    'mappings' => array_merge($this
      ->getDefaultMappings(), [
      [
        'target' => 'body',
        'map' => [
          'summary' => 'description',
          'value' => 'content',
        ],
      ],
    ]),
  ]);
  $this->url = $this->feedType
    ->toUrl('tamper');
  $this->feedTypeTamperManager = \Drupal::service('feeds_tamper.feed_type_tamper_manager');
}