public function EntityStorageBaseTest::providerLoad in Drupal 10
Data provider for testLoad().
Return value
array
- Expected output of load().
- A fixture of entities to query against. Suitable return value for loadMultiple().
- The ID we'll query.
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityStorageBaseTest.php, line 41
Class
- EntityStorageBaseTest
- @coversDefaultClass \Drupal\Core\Entity\EntityStorageBase @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function providerLoad() {
$data = [];
// Data set for a matching value.
$entity = $this
->generateEntityInterface('1');
$data['matching-value'] = [
$entity,
[
'1' => $entity,
],
'1',
];
// Data set for no matching value.
$data['no-matching-value'] = [
NULL,
[],
'0',
];
return $data;
}