You are here

public function EntityDefinitionUpdateTest::initialValueFromFieldTestCases in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php \Drupal\KernelTests\Core\Entity\EntityDefinitionUpdateTest::initialValueFromFieldTestCases()
  2. 10 core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php \Drupal\KernelTests\Core\Entity\EntityDefinitionUpdateTest::initialValueFromFieldTestCases()

Test cases for ::testInitialValueFromField.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php, line 1285

Class

EntityDefinitionUpdateTest
Tests EntityDefinitionUpdateManager functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function initialValueFromFieldTestCases() {
  return [
    'literal value' => [
      'test initial value',
      'test initial value',
    ],
    'indexed array' => [
      [
        'value' => 'test initial value',
      ],
      'test initial value',
    ],
    'empty array' => [
      [],
      NULL,
    ],
    'null' => [
      NULL,
      NULL,
    ],
  ];
}