You are here

public function ConfigEntityRevisionsRevertFormTest2::prepareRevertedRevision in Config Entity Revisions 8.2

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

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

Parameters

\Drupal\config_entity_revisions\ConfigEntityRevisionsConfigEntityInterface $revision: The revision to be published.

Return value

\Drupal\config_entity_revisions\ConfigEntityRevisionsConfigEntityInterface The resulting revision record, ready to be saved.

Overrides ConfigEntityRevisionsRevertFormBase::prepareRevertedRevision

File

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

Class

ConfigEntityRevisionsRevertFormTest2
Override revision preparation so we can test the applyRevisionChange method.

Namespace

Drupal\Tests\config_entity_revisions\Unit

Code

public function prepareRevertedRevision(ConfigEntityRevisionsConfigEntityInterface $revision) {
  $this->prepareRevertedRevisionCalled = TRUE;
  return $revision;
}