public function EntityDecoupledTranslationRevisionsTest::testInternalProperties in Drupal 9
Same name and namespace in other branches
- 8 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 527
Class
- EntityDecoupledTranslationRevisionsTest
- Test decoupled translation revisions.
Namespace
Drupal\KernelTests\Core\EntityCode
public function testInternalProperties() {
$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);
}