protected function ContentModerationSyncingTest::getAllRevisionNames in Drupal 9
Same name and namespace in other branches
- 8 core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationSyncingTest::getAllRevisionNames()
Get all the revision names in order of the revision ID.
Parameters
\Drupal\entity_test\Entity\EntityTestMulRevPub $entity: The entity.
Return value
array An array of revision names.
2 calls to ContentModerationSyncingTest::getAllRevisionNames()
- ContentModerationSyncingTest::testStateChangedPreviousRevisionDuringSync in core/
modules/ content_moderation/ tests/ src/ Kernel/ ContentModerationSyncingTest.php - Tests a moderation state changed on a previous revision during a sync.
- ContentModerationSyncingTest::testUpdatingPreviousRevisionDuringSync in core/
modules/ content_moderation/ tests/ src/ Kernel/ ContentModerationSyncingTest.php - Tests modifying a previous revision during a sync.
File
- core/
modules/ content_moderation/ tests/ src/ Kernel/ ContentModerationSyncingTest.php, line 190
Class
- ContentModerationSyncingTest
- Test content moderation when an entity is marked as 'syncing'.
Namespace
Drupal\Tests\content_moderation\KernelCode
protected function getAllRevisionNames(EntityTestMulRevPub $entity) {
$storage = $this->container
->get('entity_type.manager')
->getStorage('entity_test_mulrevpub');
return array_map(function ($revision_id) use ($storage) {
return $storage
->loadRevision($revision_id)->name->value;
}, array_keys($storage
->getQuery()
->accessCheck(FALSE)
->allRevisions()
->condition('id', $entity
->id())
->sort('revision_id', 'ASC')
->execute()));
}