You are here

public function ConfigEntityRevisionsRevertFormBaseTest::submitFormCallsAnticipatedMethods 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\ConfigEntityRevisionsRevertFormBaseTest::submitFormCallsAnticipatedMethods()
  2. 8 tests/src/Unit/ConfigEntityRevisionsRevertFormBaseTest.php \Drupal\Tests\config_entity_revisions\Unit\ConfigEntityRevisionsRevertFormBaseTest::submitFormCallsAnticipatedMethods()

Does the form submission handler

@test

File

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

Class

ConfigEntityRevisionsRevertFormBaseTest

Namespace

Drupal\Tests\config_entity_revisions\Unit

Code

public function submitFormCallsAnticipatedMethods() {

  // Start with a revision older than the published / default revision.
  $this->instance = $this
    ->getMockInstance(300, 'ConfigEntityRevisionsRevertFormTest3');
  $form = [];
  $this->instance
    ->submitForm($form, new FormState());
  $this
    ->assertEquals([
    'applyRevisionChange',
    'updateConfigEntity',
    'logUpdate',
    'displayUpdate',
    'setRedirect',
  ], $this->instance->callsMade);
}