You are here

public function EntityLegalTestBase::getUncachedEntity in Entity Legal 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Tests/EntityLegalTestBase.php \Drupal\entity_legal\Tests\EntityLegalTestBase::getUncachedEntity()
  2. 4.0.x src/Tests/EntityLegalTestBase.php \Drupal\entity_legal\Tests\EntityLegalTestBase::getUncachedEntity()

Get an entity bypassing static and db cache.

Parameters

string $entity_type: The type of entity to get.

string $entity_id: The ID or name to load the entity using.

Return value

EntityLegalDocument The retrieved entity.

5 calls to EntityLegalTestBase::getUncachedEntity()
EntityLegalDocumentAcceptanceTest::testSubmissionForm in src/Tests/EntityLegalDocumentAcceptanceTest.php
Test that user has the ability to agree to legal documents.
EntityLegalDocumentTest::testCreateForm in src/Tests/EntityLegalDocumentTest.php
Test the functionality of the create form.
EntityLegalDocumentTest::testEditForm in src/Tests/EntityLegalDocumentTest.php
Test the functionality of the edit form.
EntityLegalDocumentVersionTest::testCreateForm in src/Tests/EntityLegalDocumentVersionTest.php
Test the functionality of the create form.
EntityLegalDocumentVersionTest::testEditForm in src/Tests/EntityLegalDocumentVersionTest.php
Test the functionality of the edit form.

File

src/Tests/EntityLegalTestBase.php, line 69

Class

EntityLegalTestBase
Common Simpletest class for all legal tests.

Namespace

Drupal\entity_legal\Tests

Code

public function getUncachedEntity($entity_type, $entity_id) {
  $controller = \Drupal::entityTypeManager()
    ->getStorage($entity_type);
  $controller
    ->resetCache([
    $entity_id,
  ]);
  return $controller
    ->load($entity_id);
}