function ContentModerationSyncingTest::testNoRevisionForcedDuringSync
Same name in other branches
- 8.9.x core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationSyncingTest::testNoRevisionForcedDuringSync()
- 10 core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationSyncingTest::testNoRevisionForcedDuringSync()
- 11.x core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationSyncingTest::testNoRevisionForcedDuringSync()
Tests no new revision is forced during a sync.
File
-
core/
modules/ content_moderation/ tests/ src/ Kernel/ ContentModerationSyncingTest.php, line 45
Class
- ContentModerationSyncingTest
- Test content moderation when an entity is marked as 'syncing'.
Namespace
Drupal\Tests\content_moderation\KernelCode
public function testNoRevisionForcedDuringSync() {
$entity = EntityTestMulRevPub::create([
'moderation_state' => 'draft',
'name' => 'foo',
]);
$entity->save();
$initial_revision_id = $entity->getRevisionId();
$entity->setSyncing(TRUE);
$entity->name = 'bar';
$entity->save();
$this->assertEquals($entity->getRevisionId(), $initial_revision_id);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.