You are here

public function ConfigEntityRevisionsRevertFormTest2::prepareToPublishCurrentRevision in Config Entity Revisions 1.x

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/ConfigEntityRevisionsRevertFormBaseTest.php \Drupal\Tests\config_entity_revisions\Unit\ConfigEntityRevisionsRevertFormTest2::prepareToPublishCurrentRevision()
  2. 8 tests/src/Unit/ConfigEntityRevisionsRevertFormBaseTest.php \Drupal\Tests\config_entity_revisions\Unit\ConfigEntityRevisionsRevertFormTest2::prepareToPublishCurrentRevision()

Override prepareToPublishCurrentRevision so we can be sure it is actually called.

Parameters

ConfigEntityRevisionsEntityInterface $revision: The revision to be published.

Return value

ConfigEntityRevisionsEntityInterface The resulting revision record, ready to be saved.

Overrides ConfigEntityRevisionsRevertFormBase::prepareToPublishCurrentRevision

File

tests/src/Unit/ConfigEntityRevisionsRevertFormBaseTest.php, line 586

Class

ConfigEntityRevisionsRevertFormTest2

Namespace

Drupal\Tests\config_entity_revisions\Unit

Code

public function prepareToPublishCurrentRevision(ConfigEntityRevisionsEntityInterface $revision) {
  $this->prepareToPublishCurrentRevisionCalled = TRUE;
  return $revision;
}