function EntityDecoupledTranslationRevisionsTest::testInternalProperties

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

Tests that internal properties are preserved while creating a new revision.

File

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

Class

EntityDecoupledTranslationRevisionsTest
Test decoupled translation revisions.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testInternalProperties() : void {
    $entity = EntityTestMulRev::create();
    $this->doTestInternalProperties($entity);
    $entity = EntityTestMulRev::create();
    $entity->save();
    $this->doTestInternalProperties($entity);
    
    /** @var \Drupal\entity_test\Entity\EntityTestMulRev $translation */
    $translation = EntityTestMulRev::create()->addTranslation('it');
    $translation->save();
    $this->doTestInternalProperties($translation);
}

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