protected function ResourceTestBase::entityLoadUnchanged in Drupal 8
Same name and namespace in other branches
- 9 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::entityLoadUnchanged()
Loads an entity in the test container, ignoring the static cache.
@todo Remove this after https://www.drupal.org/project/drupal/issues/3038706 lands.
Parameters
int $id: The entity ID.
Return value
\Drupal\Core\Entity\EntityInterface|null The loaded entity.
4 calls to ResourceTestBase::entityLoadUnchanged()
- ResourceTestBase::setUpFields in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php - Sets up additional fields for testing.
- ResourceTestBase::testPatchIndividual in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php - Tests PATCHing an individual resource, plus edge cases to ensure good DX.
- ResourceTestBase::testPostIndividual in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php - Tests POSTing an individual resource, plus edge cases to ensure good DX.
- ResourceTestBase::testRevisions in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php - Tests individual and collection revisions.
File
- core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php, line 3410
Class
- ResourceTestBase
- Subclass this for every JSON:API resource type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function entityLoadUnchanged($id) {
$this->entityStorage
->resetCache();
return $this->entityStorage
->loadUnchanged($id);
}