function EntityDecoupledTranslationRevisionsTest::doTestInternalProperties

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php \Drupal\KernelTests\Core\Entity\EntityDecoupledTranslationRevisionsTest::doTestInternalProperties()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php \Drupal\KernelTests\Core\Entity\EntityDecoupledTranslationRevisionsTest::doTestInternalProperties()
  3. 10 core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php \Drupal\KernelTests\Core\Entity\EntityDecoupledTranslationRevisionsTest::doTestInternalProperties()

Checks that internal properties are preserved for the specified entity.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: An entity object.

1 call to EntityDecoupledTranslationRevisionsTest::doTestInternalProperties()
EntityDecoupledTranslationRevisionsTest::testInternalProperties in core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php
Tests that internal properties are preserved while creating a new revision.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php, line 549

Class

EntityDecoupledTranslationRevisionsTest
Test decoupled translation revisions.

Namespace

Drupal\KernelTests\Core\Entity

Code

protected function doTestInternalProperties(ContentEntityInterface $entity) {
    $this->assertFalse($entity->isValidationRequired());
    $entity->setValidationRequired(TRUE);
    $this->assertTrue($entity->isValidationRequired());
    $new_revision = $this->storage
        ->createRevision($entity);
    $this->assertTrue($new_revision->isValidationRequired());
}

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