You are here

public function DependencyFieldMapGeneratorTest::fieldMapTestCases in Entity Reference Integrity 8

Test cases for ::testFieldMap.

File

tests/src/Unit/DependencyFieldMapGeneratorTest.php, line 66

Class

DependencyFieldMapGeneratorTest
Test the field map generator.

Namespace

Drupal\Tests\entity_reference_integrity\Unit

Code

public function fieldMapTestCases() {
  return [
    'Standard field' => [
      FALSE,
      TRUE,
      [],
      [
        'foo_entity_type_id' => [
          'field_name' => [],
        ],
      ],
      [
        'foo_entity_type_id' => [
          'field_name',
        ],
      ],
    ],
    'Custom storage field' => [
      TRUE,
      TRUE,
      [],
      [
        'foo_entity_type_id' => [
          'field_name' => [],
        ],
      ],
      [],
    ],
    'No storage definition' => [
      FALSE,
      FALSE,
      [],
      [
        'foo_entity_type_id' => [
          'field_name' => [],
        ],
      ],
      [],
    ],
    'Field is revision metadata' => [
      FALSE,
      TRUE,
      [
        'field_name',
      ],
      [
        'foo_entity_type_id' => [
          'field_name' => [],
        ],
      ],
      [],
    ],
  ];
}