You are here

protected function FeedCreationTrait::getDefaultMappings in Feeds 8.3

Returns default mappings for tests.

Can be overridden by specific tests.

Return value

array A list of default mappings.

18 calls to FeedCreationTrait::getDefaultMappings()
BasicFieldSourceTest::testImportWithTaxonomyTermReferenceSource in tests/src/Kernel/Feeds/Source/BasicFieldSourceTest.php
Tests importing using a taxonomy term reference source.
ConfigEntityReferenceTest::testImportById in tests/src/Kernel/Feeds/Target/ConfigEntityReferenceTest.php
Tests importing config entity references by ID.
ConfigEntityReferenceTest::testImportByLabel in tests/src/Kernel/Feeds/Target/ConfigEntityReferenceTest.php
Tests importing config entity references by label.
ConfigEntityReferenceTest::testImportByUuid in tests/src/Kernel/Feeds/Target/ConfigEntityReferenceTest.php
Tests importing config entity references by UUID.
DependencyTest::testFieldDependency in tests/src/Kernel/DependencyTest.php
Tests dependency on a single field.

... See full list

1 method overrides FeedCreationTrait::getDefaultMappings()
TranslationTest::getDefaultMappings in tests/src/Kernel/Feeds/Target/TranslationTest.php
Overrides FeedCreationTrait::getDefaultMappings().

File

tests/src/Traits/FeedCreationTrait.php, line 106

Class

FeedCreationTrait
Provides methods to create feeds and feed types with default settings.

Namespace

Drupal\Tests\feeds\Traits

Code

protected function getDefaultMappings() {
  return [
    [
      'target' => 'feeds_item',
      'map' => [
        'guid' => 'guid',
      ],
      'unique' => [
        'guid' => TRUE,
      ],
      'settings' => [],
    ],
    [
      'target' => 'title',
      'map' => [
        'value' => 'title',
      ],
      'unique' => [],
      'settings' => [
        'language' => NULL,
      ],
    ],
  ];
}