You are here

protected function UpdateExistingTest::setUp in Feeds 8.3

Overrides FeedsBrowserTestBase::setUp

File

tests/src/Functional/UpdateExistingTest.php, line 25

Class

UpdateExistingTest
Tests the feature of updating items.

Namespace

Drupal\Tests\feeds\Functional

Code

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

  // Create a feed type.
  $this->feedType = $this
    ->createFeedTypeForCsv([
    'title' => 'title',
  ], [
    'processor_configuration' => [
      'update_existing' => ProcessorInterface::UPDATE_EXISTING,
      'values' => [
        'type' => 'article',
      ],
    ],
    'mappings' => [
      [
        'target' => 'title',
        'map' => [
          'value' => 'title',
        ],
        'unique' => [
          'value' => TRUE,
        ],
      ],
    ],
  ]);
}