function EntityStorageBaseTest::providerLoad

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/EntityStorageBaseTest.php \Drupal\Tests\Core\Entity\EntityStorageBaseTest::providerLoad()
  2. 11.x core/tests/Drupal/Tests/Core/Entity/EntityStorageBaseTest.php \Drupal\Tests\Core\Entity\EntityStorageBaseTest::providerLoad()

Data provider for testLoad().

File

core/tests/Drupal/Tests/Core/Entity/EntityStorageBaseTest.php, line 37

Class

EntityStorageBaseTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Entity%21EntityStorageBase.php/class/EntityStorageBase/10" title="A base entity storage class." class="local">\Drupal\Core\Entity\EntityStorageBase</a> @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

public static function providerLoad() : \Generator {
    // Data set for a matching value.
    (yield 'matching-value' => [
        '1',
        [
            '1' => '1',
        ],
        '1',
    ]);
    // Data set for no matching value.
    (yield 'no-matching-value' => [
        NULL,
        [],
        '0',
    ]);
}

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