function ContentEntityStorageBaseTest::providerTestCreate

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php \Drupal\KernelTests\Core\Entity\ContentEntityStorageBaseTest::providerTestCreate()
  2. 10 core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php \Drupal\KernelTests\Core\Entity\ContentEntityStorageBaseTest::providerTestCreate()
  3. 11.x core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php \Drupal\KernelTests\Core\Entity\ContentEntityStorageBaseTest::providerTestCreate()

Provides test data for testCreate().

File

core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php, line 44

Class

ContentEntityStorageBaseTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Entity%21ContentEntityStorageBase.php/class/ContentEntityStorageBase/8.9.x" title="Base class for content entity storage handlers." class="local">\Drupal\Core\Entity\ContentEntityStorageBase</a>

Namespace

Drupal\KernelTests\Core\Entity

Code

public function providerTestCreate() {
    return [
        [
            'scalar' => 'test_bundle',
        ],
        [
            'array keyed by delta' => [
                0 => [
                    'value' => 'test_bundle',
                ],
            ],
        ],
        [
            'array keyed by main property name' => [
                'value' => 'test_bundle',
            ],
        ],
    ];
}

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