Unverified Commit aee577b8 authored by larowlan's avatar larowlan
Browse files

Issue #2890364 by timmillwood, amateescu, plach, xjm: Replace all uses of...

Issue #2890364 by timmillwood, amateescu, plach, xjm: Replace all uses of "forward revision" with "pending revision"
parent 13e93c04
......@@ -5,7 +5,7 @@
use Symfony\Component\Validator\Constraint;
/**
* Validation constraint for changing the book outline in forward revisions.
* Validation constraint for changing the book outline in pending revisions.
*
* @Constraint(
* id = "BookOutline",
......
......@@ -9,7 +9,7 @@
use Symfony\Component\Validator\ConstraintValidator;
/**
* Constraint validator for changing the book outline in forward revisions.
* Constraint validator for changing the book outline in pending revisions.
*/
class BookOutlineConstraintValidator extends ConstraintValidator implements ContainerInjectionInterface {
......
......@@ -41,7 +41,7 @@ protected function setUp() {
/**
* Tests that book drafts can not modify the book outline.
*/
public function testBookWithForwardRevisions() {
public function testBookWithPendingRevisions() {
// Create two books.
$book_1_nodes = $this->createBook(t('Save and Publish'));
$book_1 = $this->book;
......
......@@ -7,11 +7,11 @@
use Drupal\KernelTests\KernelTestBase;
/**
* Tests that the Book module handles forward revisions correctly.
* Tests that the Book module handles pending revisions correctly.
*
* @group book
*/
class BookForwardRevisionTest extends KernelTestBase {
class BookPendingRevisionTest extends KernelTestBase {
/**
* Modules to enable.
......@@ -34,9 +34,9 @@ protected function setUp() {
}
/**
* Tests forward revision handling for books.
* Tests pending revision handling for books.
*/
public function testBookWithForwardRevisions() {
public function testBookWithPendingRevisions() {
$content_type = NodeType::create([
'type' => $this->randomMachineName(),
'name' => $this->randomString(),
......@@ -65,36 +65,36 @@ public function testBookWithForwardRevisions() {
$child->book['pid'] = $book_1->id();
$child->save();
// Try to move the child to a different book while saving it as a forward
// Try to move the child to a different book while saving it as a pending
// revision.
/** @var \Drupal\book\BookManagerInterface $book_manager */
$book_manager = $this->container->get('book.manager');
// Check that the API doesn't allow us to change the book outline for
// forward revisions.
// pending revisions.
$child->book['bid'] = $book_2->id();
$child->setNewRevision(TRUE);
$child->isDefaultRevision(FALSE);
$this->assertFalse($book_manager->updateOutline($child), 'A forward revision can not change the book outline.');
$this->assertFalse($book_manager->updateOutline($child), 'A pending revision can not change the book outline.');
// Check that the API doesn't allow us to change the book parent for
// forward revisions.
// pending revisions.
$child = \Drupal::entityTypeManager()->getStorage('node')->loadUnchanged($child->id());
$child->book['pid'] = $book_1_child->id();
$child->setNewRevision(TRUE);
$child->isDefaultRevision(FALSE);
$this->assertFalse($book_manager->updateOutline($child), 'A forward revision can not change the book outline.');
$this->assertFalse($book_manager->updateOutline($child), 'A pending revision can not change the book outline.');
// Check that the API doesn't allow us to change the book weight for
// forward revisions.
// pending revisions.
$child = \Drupal::entityTypeManager()->getStorage('node')->loadUnchanged($child->id());
$child->book['weight'] = 2;
$child->setNewRevision(TRUE);
$child->isDefaultRevision(FALSE);
$this->assertFalse($book_manager->updateOutline($child), 'A forward revision can not change the book outline.');
$this->assertFalse($book_manager->updateOutline($child), 'A pending revision can not change the book outline.');
}
}
......@@ -34,7 +34,7 @@ public function __construct(ModerationInformationInterface $moderation_informati
}
/**
* Checks that there is a forward revision available.
* Checks that there is a pending revision available.
*
* This checker assumes the presence of an '_entity_access' requirement key
* in the same form as used by EntityAccessCheck.
......@@ -54,7 +54,7 @@ public function __construct(ModerationInformationInterface $moderation_informati
public function access(Route $route, RouteMatchInterface $route_match, AccountInterface $account) {
// This tab should not show up unless there's a reason to show it.
$entity = $this->loadEntity($route, $route_match);
if ($this->moderationInfo->hasForwardRevision($entity)) {
if ($this->moderationInfo->hasPendingRevision($entity)) {
// Check the global permissions first.
$access_result = AccessResult::allowedIfHasPermissions($account, ['view latest version', 'view any unpublished content']);
if (!$access_result->isAllowed()) {
......
......@@ -242,8 +242,8 @@ public function entityView(array &$build, EntityInterface $entity, EntityViewDis
// Don't display the moderation form when when:
// - The revision is not translation affected.
// - There are more than one translation languages.
// - The entity has forward revisions.
if (!$this->moderationInfo->isForwardRevisionAllowed($entity)) {
// - The entity has pending revisions.
if (!$this->moderationInfo->isPendingRevisionAllowed($entity)) {
return;
}
......
......@@ -300,7 +300,7 @@ public function formAlter(array &$form, FormStateInterface $form_state, $form_id
->getHandler($entity->getEntityTypeId(), 'moderation')
->enforceRevisionsEntityFormAlter($form, $form_state, $form_id);
if (!$this->moderationInfo->isForwardRevisionAllowed($entity)) {
if (!$this->moderationInfo->isPendingRevisionAllowed($entity)) {
$latest_revision = $this->moderationInfo->getLatestRevision($entity->getEntityTypeId(), $entity->id());
if ($entity->bundle()) {
$bundle_type_id = $entity->getEntityType()->getBundleEntityType();
......@@ -318,8 +318,8 @@ public function formAlter(array &$form, FormStateInterface $form_state, $form_id
'@latest_revision_delete_url' => $translation->toUrl('delete-form', ['language' => $translation->language()])->toString(),
];
$label = $this->t('Unable to save this @type_label.', $args);
$message = $this->t('<a href="@latest_revision_edit_url">Publish</a> or <a href="@latest_revision_delete_url">delete</a> the latest draft revision to allow all workflow transitions.', $args);
$full_message = $this->t('Unable to save this @type_label. <a href="@latest_revision_edit_url">Publish</a> or <a href="@latest_revision_delete_url">delete</a> the latest draft revision to allow all workflow transitions.', $args);
$message = $this->t('<a href="@latest_revision_edit_url">Publish</a> or <a href="@latest_revision_delete_url">delete</a> the latest revision to allow all workflow transitions.', $args);
$full_message = $this->t('Unable to save this @type_label. <a href="@latest_revision_edit_url">Publish</a> or <a href="@latest_revision_delete_url">delete</a> the latest revision to allow all workflow transitions.', $args);
drupal_set_message($full_message, 'error');
$form['actions']['#access'] = FALSE;
......@@ -351,7 +351,7 @@ public function formAlter(array &$form, FormStateInterface $form_state, $form_id
}
/**
* Redirect content entity edit forms on save, if there is a forward revision.
* Redirect content entity edit forms on save, if there is a pending revision.
*
* When saving their changes, editors should see those changes displayed on
* the next page.
......@@ -366,7 +366,7 @@ public static function bundleFormRedirect(array &$form, FormStateInterface $form
$entity = $form_state->getFormObject()->getEntity();
$moderation_info = \Drupal::getContainer()->get('content_moderation.moderation_information');
if ($moderation_info->hasForwardRevision($entity) && $entity->hasLinkTemplate('latest-version')) {
if ($moderation_info->hasPendingRevision($entity) && $entity->hasLinkTemplate('latest-version')) {
$entity_type_id = $entity->getEntityTypeId();
$form_state->setRedirect("entity.$entity_type_id.latest_version", [$entity_type_id => $entity->id()]);
}
......
......@@ -140,7 +140,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$new_state = $this->moderationInfo->getWorkflowForEntity($entity)->getTypePlugin()->getState($new_state);
// The page we're on likely won't be visible if we just set the entity to
// the default state, as we hide that latest-revision tab if there is no
// forward revision. Redirect to the canonical URL instead, since that will
// pending revision. Redirect to the canonical URL instead, since that will
// still exist.
if ($new_state->isDefaultRevisionState()) {
$form_state->setRedirectUrl($entity->toUrl('canonical'));
......
......@@ -127,8 +127,8 @@ public function getAffectedRevisionTranslation(ContentEntityInterface $entity) {
/**
* {@inheritdoc}
*/
public function isForwardRevisionAllowed(ContentEntityInterface $entity) {
return !(!$entity->isRevisionTranslationAffected() && count($entity->getTranslationLanguages()) > 1 && $this->hasForwardRevision($entity));
public function isPendingRevisionAllowed(ContentEntityInterface $entity) {
return !(!$entity->isRevisionTranslationAffected() && count($entity->getTranslationLanguages()) > 1 && $this->hasPendingRevision($entity));
}
/**
......@@ -141,7 +141,7 @@ public function isLatestRevision(ContentEntityInterface $entity) {
/**
* {@inheritdoc}
*/
public function hasForwardRevision(ContentEntityInterface $entity) {
public function hasPendingRevision(ContentEntityInterface $entity) {
return $this->isModeratedEntity($entity)
&& !($this->getLatestRevisionId($entity->getEntityTypeId(), $entity->id()) == $this->getDefaultRevisionId($entity->getEntityTypeId(), $entity->id()));
}
......
......@@ -101,7 +101,7 @@ public function getDefaultRevisionId($entity_type_id, $entity_id);
public function getAffectedRevisionTranslation(ContentEntityInterface $entity);
/**
* Determines if forward revisions are allowed.
* Determines if pending revisions are allowed.
*
* @internal
*
......@@ -109,9 +109,9 @@ public function getAffectedRevisionTranslation(ContentEntityInterface $entity);
* The content entity.
*
* @return bool
* If forward revisions are allowed.
* If pending revisions are allowed.
*/
public function isForwardRevisionAllowed(ContentEntityInterface $entity);
public function isPendingRevisionAllowed(ContentEntityInterface $entity);
/**
* Determines if an entity is a latest revision.
......@@ -126,15 +126,15 @@ public function isForwardRevisionAllowed(ContentEntityInterface $entity);
public function isLatestRevision(ContentEntityInterface $entity);
/**
* Determines if a forward revision exists for the specified entity.
* Determines if a pending revision exists for the specified entity.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity which may or may not have a forward revision.
* The entity which may or may not have a pending revision.
*
* @return bool
* TRUE if this entity has forward revisions available, FALSE otherwise.
* TRUE if this entity has pending revisions available, FALSE otherwise.
*/
public function hasForwardRevision(ContentEntityInterface $entity);
public function hasPendingRevision(ContentEntityInterface $entity);
/**
* Determines if an entity is "live".
......
......@@ -41,23 +41,23 @@ public function __construct(EntityManagerInterface $entity_manager, ModerationIn
* {@inheritdoc}
*/
public function applies($definition, $name, Route $route) {
return $this->hasForwardRevisionFlag($definition) || $this->isEditFormPage($route);
return $this->hasPendingRevisionFlag($definition) || $this->isEditFormPage($route);
}
/**
* Determines if the route definition includes a forward-revision flag.
* Determines if the route definition includes a pending revision flag.
*
* This is a custom flag defined by the Content Moderation module to load
* forward revisions rather than the default revision on a given route.
* pending revisions rather than the default revision on a given route.
*
* @param array $definition
* The parameter definition provided in the route options.
*
* @return bool
* TRUE if the forward revision flag is set, FALSE otherwise.
* TRUE if the pending revision flag is set, FALSE otherwise.
*/
protected function hasForwardRevisionFlag(array $definition) {
return (isset($definition['load_forward_revision']) && $definition['load_forward_revision']);
protected function hasPendingRevisionFlag(array $definition) {
return (isset($definition['load_pending_revision']) && $definition['load_pending_revision']);
}
/**
......
......@@ -88,7 +88,7 @@ protected function getLatestVersionRoute(EntityTypeInterface $entity_type) {
->setOption('parameters', [
$entity_type_id => [
'type' => 'entity:' . $entity_type_id,
'load_forward_revision' => 1,
'load_pending_revision' => 1,
],
]);
......
......@@ -36,9 +36,7 @@ protected function setUp() {
/**
* Tests the moderation form that shows on the latest version page.
*
* The latest version page only shows if there is a forward revision. There
* is only a forward revision if a draft revision is created on a node where
* the default revision is not a published moderation state.
* The latest version page only shows if there is a pending revision.
*
* @see \Drupal\content_moderation\EntityOperations
* @see \Drupal\Tests\content_moderation\Functional\ModerationStateBlockTest::testCustomBlockModeration
......@@ -63,7 +61,7 @@ public function testModerationForm() {
$this->assertResponse(200);
$this->assertField('edit-new-state', 'The node view page has a moderation form.');
// The latest version page should not show, because there is no forward
// The latest version page should not show, because there is no pending
// revision.
$this->drupalGet($latest_version_path);
$this->assertResponse(403);
......@@ -80,7 +78,7 @@ public function testModerationForm() {
$this->assertField('edit-new-state', 'The node view page has a moderation form.');
// The latest version page should not show, because there is still no
// forward revision.
// pending revision.
$this->drupalGet($latest_version_path);
$this->assertResponse(403);
......@@ -96,11 +94,11 @@ public function testModerationForm() {
$this->assertNoField('edit-new-state', 'The node view page has no moderation form.');
// The latest version page should not show, because there is still no
// forward revision.
// pending revision.
$this->drupalGet($latest_version_path);
$this->assertResponse(403);
// Make a forward revision.
// Make a pending revision.
$this->drupalPostForm($edit_path, [
'body[0][value]' => 'Fourth version of the content.',
], t('Save and Create New Draft'));
......@@ -112,7 +110,7 @@ public function testModerationForm() {
$this->assertNoField('edit-new-state', 'The node view page has no moderation form.');
// The latest version page should show the moderation form and have "Draft"
// status, because the forward revision is in "Draft".
// status, because the pending revision is in "Draft".
$this->drupalGet($latest_version_path);
$this->assertResponse(200);
$this->assertField('edit-new-state', 'The latest-version page has a moderation form.');
......@@ -124,7 +122,7 @@ public function testModerationForm() {
], t('Apply'));
// The latest version page should not show, because there is no
// forward revision.
// pending revision.
$this->drupalGet($latest_version_path);
$this->assertResponse(403);
}
......@@ -141,7 +139,7 @@ public function testNonBundleModerationForm() {
// Create new moderated content in draft.
$this->drupalPostForm('entity_test_mulrevpub/add', [], t('Save and Create New Draft'));
// The latest version page should not show, because there is no forward
// The latest version page should not show, because there is no pending
// revision.
$this->drupalGet('/entity_test_mulrevpub/manage/1/latest');
$this->assertResponse(403);
......@@ -150,7 +148,7 @@ public function testNonBundleModerationForm() {
$this->drupalPostForm('entity_test_mulrevpub/manage/1/edit', [], t('Save and Create New Draft'));
// The latest version page should not show, because there is still no
// forward revision.
// pending revision.
$this->drupalGet('/entity_test_mulrevpub/manage/1/latest');
$this->assertResponse(403);
......@@ -164,11 +162,11 @@ public function testNonBundleModerationForm() {
$this->assertNoText('Status', 'The node view page has no moderation form.');
// The latest version page should not show, because there is still no
// forward revision.
// pending revision.
$this->drupalGet('entity_test_mulrevpub/manage/1/latest');
$this->assertResponse(403);
// Make a forward revision.
// Make a pending revision.
$this->drupalPostForm('entity_test_mulrevpub/manage/1/edit', [], t('Save and Create New Draft'));
// The published view should not have a moderation form, because it is the
......@@ -178,7 +176,7 @@ public function testNonBundleModerationForm() {
$this->assertNoText('Status', 'The node view page has no moderation form.');
// The latest version page should show the moderation form and have "Draft"
// status, because the forward revision is in "Draft".
// status, because the pending revision is in "Draft".
$this->drupalGet('entity_test_mulrevpub/manage/1/latest');
$this->assertResponse(200);
$this->assertText('Status', 'Form text found on the latest-version page.');
......@@ -190,7 +188,7 @@ public function testNonBundleModerationForm() {
], t('Apply'));
// The latest version page should not show, because there is no
// forward revision.
// pending revision.
$this->drupalGet('entity_test_mulrevpub/manage/1/latest');
$this->assertResponse(403);
}
......@@ -201,7 +199,7 @@ public function testNonBundleModerationForm() {
public function testModerationFormSetsRevisionAuthor() {
// Create new moderated content in published.
$node = $this->createNode(['type' => 'moderated_content', 'moderation_state' => 'published']);
// Make a forward revision.
// Make a pending revision.
$node->title = $this->randomMachineName();
$node->moderation_state->value = 'draft';
$node->save();
......@@ -273,7 +271,7 @@ public function testContentTranslationNodeForm() {
$this->assertSession()->statusCodeEquals('403');
$this->assertFalse($this->xpath('//ul[@class="entity-moderation-form"]'));
// Add french forward revision (revision 3).
// Add french pending revision (revision 3).
$this->drupalGet($edit_path, ['language' => $french]);
$this->assertTrue($this->xpath('//input[@value="Save and Create New Draft (this translation)"]'));
$this->assertTrue($this->xpath('//input[@value="Save and Publish (this translation)"]'));
......@@ -302,7 +300,7 @@ public function testContentTranslationNodeForm() {
$this->drupalGet($latest_version_path);
$this->assertFalse($this->xpath('//ul[@class="entity-moderation-form"]'));
// Publish the french forward revision (revision 4).
// Publish the french pending revision (revision 4).
$this->drupalGet($edit_path, ['language' => $french]);
$this->assertTrue($this->xpath('//input[@value="Save and Create New Draft (this translation)"]'));
$this->assertTrue($this->xpath('//input[@value="Save and Publish (this translation)"]'));
......@@ -326,13 +324,13 @@ public function testContentTranslationNodeForm() {
$this->drupalGet($latest_version_path);
$this->assertFalse($this->xpath('//ul[@class="entity-moderation-form"]'));
// Make sure we're allowed to create a forward french revision.
// Make sure we're allowed to create a pending french revision.
$this->drupalGet($edit_path, ['language' => $french]);
$this->assertTrue($this->xpath('//input[@value="Save and Create New Draft (this translation)"]'));
$this->assertTrue($this->xpath('//input[@value="Save and Publish (this translation)"]'));
$this->assertTrue($this->xpath('//input[@value="Save and Archive (this translation)"]'));
// Add a english forward revision (revision 6).
// Add a english pending revision (revision 6).
$this->drupalGet($edit_path);
$this->assertTrue($this->xpath('//input[@value="Save and Create New Draft (this translation)"]'));
$this->assertTrue($this->xpath('//input[@value="Save and Publish (this translation)"]'));
......@@ -344,7 +342,7 @@ public function testContentTranslationNodeForm() {
$this->drupalGet($latest_version_path);
$this->assertTrue($this->xpath('//ul[@class="entity-moderation-form"]'));
// Make sure we're not allowed to create a forward french revision.
// Make sure we're not allowed to create a pending french revision.
$this->drupalGet($edit_path, ['language' => $french]);
$this->assertFalse($this->xpath('//input[@value="Save and Create New Draft (this translation)"]'));
$this->assertFalse($this->xpath('//input[@value="Save and Publish (this translation)"]'));
......@@ -354,7 +352,7 @@ public function testContentTranslationNodeForm() {
$this->drupalGet($latest_version_path, ['language' => $french]);
$this->assertFalse($this->xpath('//ul[@class="entity-moderation-form"]'));
// We should be able to publish the english forward revision (revision 7)
// We should be able to publish the english pending revision (revision 7)
$this->drupalGet($edit_path);
$this->assertTrue($this->xpath('//input[@value="Save and Create New Draft (this translation)"]'));
$this->assertTrue($this->xpath('//input[@value="Save and Publish (this translation)"]'));
......@@ -366,13 +364,13 @@ public function testContentTranslationNodeForm() {
$this->drupalGet($latest_version_path);
$this->assertFalse($this->xpath('//ul[@class="entity-moderation-form"]'));
// Make sure we're allowed to create a forward french revision.
// Make sure we're allowed to create a pending french revision.
$this->drupalGet($edit_path, ['language' => $french]);
$this->assertTrue($this->xpath('//input[@value="Save and Create New Draft (this translation)"]'));
$this->assertTrue($this->xpath('//input[@value="Save and Publish (this translation)"]'));
$this->assertTrue($this->xpath('//input[@value="Save and Archive (this translation)"]'));
// Make sure we're allowed to create a forward english revision.
// Make sure we're allowed to create a pending english revision.
$this->drupalGet($edit_path);
$this->assertTrue($this->xpath('//input[@value="Save and Create New Draft (this translation)"]'));
$this->assertTrue($this->xpath('//input[@value="Save and Publish (this translation)"]'));
......@@ -389,7 +387,7 @@ public function testContentTranslationNodeForm() {
$edit_path = sprintf('node/%d/edit', $node->id());
$translate_path = sprintf('node/%d/translations/add/en/fr', $node->id());
// Add a forward revision (revision 2).
// Add a pending revision (revision 2).
$this->drupalGet($edit_path);
$this->assertTrue($this->xpath('//input[@value="Save and Create New Draft (this translation)"]'));
$this->assertTrue($this->xpath('//input[@value="Save and Publish (this translation)"]'));
......@@ -398,7 +396,7 @@ public function testContentTranslationNodeForm() {
'body[0][value]' => 'Second version of the content.',
], t('Save and Create New Draft (this translation)'));
// It shouldn't be possible to translate as we have a forward revision.
// It shouldn't be possible to translate as we have a pending revision.
$this->drupalGet($translate_path);
$this->assertFalse($this->xpath('//input[@value="Save and Create New Draft (this translation)"]'));
$this->assertFalse($this->xpath('//input[@value="Save and Publish (this translation)"]'));
......
......@@ -93,18 +93,18 @@ public function testCustomBlockModeration() {
$this->drupalGet('');
$this->assertText($updated_body);
// Publish the block so we can create a forward revision.
// Publish the block so we can create a pending revision.
$this->drupalPostForm('block/' . $block->id(), [], t('Save and Publish'));
// Create a forward revision.
$forward_revision_body = 'This is the forward revision body value';
// Create a pending revision.
$pending_revision_body = 'This is the pending revision body value';
$edit = [
'body[0][value]' => $forward_revision_body,
'body[0][value]' => $pending_revision_body,
];
$this->drupalPostForm('block/' . $block->id(), $edit, t('Save and Create New Draft'));
$this->assertText(t('basic Moderated block has been updated.'));
// Navigate to home page and check that the forward revision doesn't show,
// Navigate to home page and check that the pending revision doesn't show,
// since it should not be set as the default revision.
$this->drupalGet('');
$this->assertText($updated_body);
......@@ -116,10 +116,10 @@ public function testCustomBlockModeration() {
$this->drupalPostForm('block/' . $block->id() . '/latest', $edit, t('Apply'));
$this->assertText(t('The moderation state has been updated.'));
// Navigate to home page and check that the forward revision is now the
// Navigate to home page and check that the pending revision is now the
// default revision and therefore visible.
$this->drupalGet('');
$this->assertText($forward_revision_body);
$this->assertText($pending_revision_body);
}
}
......@@ -105,7 +105,7 @@ public function testFormSaveDestination() {
$this->assertUrl(Url::fromRoute('entity.node.canonical', ['node' => $node->id()]));
$this->assertText('Third version of the content.');
// Make a new forward revision; after saving, we should be on the "Latest
// Make a new pending revision; after saving, we should be on the "Latest
// version" tab.
$this->drupalPostForm($edit_path, [
'body[0][value]' => 'Fourth version of the content.',
......
......@@ -116,7 +116,7 @@ public function testPageAccess() {
$this->drupalGet($view_path);
$this->assertResponse(200);
// Create a forward revision for the 'Latest revision' tab.
// Create a pending revision for the 'Latest revision' tab.
$this->drupalLogin($this->adminUser);
$this->drupalPostForm($edit_path, [
'title[0][value]' => 'moderated content revised',
......@@ -132,7 +132,7 @@ public function testPageAccess() {
$this->drupalGet($view_path);
$this->assertResponse(200);
// Now make another user, who should not be able to see forward revisions.
// Now make another user, who should not be able to see pending revisions.
$user = $this->createUser([
'use editorial transition create_new_draft',
]);
......
......@@ -55,9 +55,9 @@ protected function createNodeType() {
}
/**
* Verifies that the process of saving forward-revisions works as expected.
* Verifies that the process of saving pending revisions works as expected.
*/
public function testForwardRevisions() {
public function testPendingRevisions() {
// Create a new node in draft.
$page = Node::create([
'type' => 'page',
......@@ -68,7 +68,7 @@ public function testForwardRevisions() {
$id = $page->id();
// Verify the entity saved correctly, and that the presence of forward
// Verify the entity saved correctly, and that the presence of pending
// revisions doesn't affect the default node load.
/** @var Node $page */
$page = Node::load($id);
......@@ -87,7 +87,7 @@ public function testForwardRevisions() {
$this->assertTrue($page->isDefaultRevision());
$this->assertTrue($page->isPublished());
// Make a new forward-revision in Draft.
// Make a new pending revision in Draft.
$page->setTitle('C');
$page->moderation_state->value = 'draft';
$page->save();
......@@ -96,7 +96,7 @@ public function testForwardRevisions() {
$page = Node::load($id);
$this->assertEquals('B', $page->getTitle());
// Verify we can load the forward revision, even if the mechanism is kind
// Verify we can load the pending revision, even if the mechanism is kind
// of gross. Note: revisionIds() is only available on NodeStorageInterface,