You are here

public function EckEntityTest::baseFieldDefinitionTestDataProvider in Entity Construction Kit (ECK) 8

Provides test base field definition data.

Return value

array The test data.

File

tests/src/Unit/EckEntityTest.php, line 24

Class

EckEntityTest
Tests eck entities.

Namespace

Drupal\Tests\eck\Unit

Code

public function baseFieldDefinitionTestDataProvider() {
  return [
    'default' => [
      'config' => [],
      'expectedFieldIds' => [
        'id',
        'uuid',
        'langcode',
        'type',
      ],
    ],
    'with title field' => [
      'config' => [
        'title' => TRUE,
      ],
      'expectedFieldIds' => [
        'id',
        'uuid',
        'langcode',
        'type',
        'title',
      ],
    ],
    'with uid field' => [
      'config' => [
        'uid' => TRUE,
      ],
      'expectedFieldIds' => [
        'id',
        'uuid',
        'langcode',
        'type',
        'uid',
      ],
    ],
    'with created field' => [
      'config' => [
        'created' => TRUE,
      ],
      'expectedFieldIds' => [
        'id',
        'uuid',
        'langcode',
        'type',
        'created',
      ],
    ],
    'with changed field' => [
      'config' => [
        'changed' => TRUE,
      ],
      'expectedFieldIds' => [
        'id',
        'uuid',
        'langcode',
        'type',
        'changed',
      ],
    ],
  ];
}