function EntityDefinitionUpdateProviderTest::initialValueFromFieldTestCases

Same name in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php \Drupal\KernelTests\Core\Entity\EntityDefinitionUpdateProviderTest::initialValueFromFieldTestCases()

Test cases for ::testInitialValueFromField.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateProviderTest.php, line 342

Class

EntityDefinitionUpdateProviderTest
Tests EntityDefinitionUpdateManager functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

public static 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,
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.