function KeyValueEntityStorageTest::testLoadMissingEntity
Tests load missing entity.
@legacy-covers ::load
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ KeyValueStore/ KeyValueEntityStorageTest.php, line 510
Class
Namespace
Drupal\Tests\Core\Entity\KeyValueStoreCode
public function testLoadMissingEntity() : void {
$this->setUpKeyValueEntityStorage();
$this->keyValueStore
->expects($this->once())
->method('getMultiple')
->with([
'foo',
])
->willReturn([]);
$entity = $this->entityStorage
->load('foo');
$this->assertNull($entity);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.