You are here

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

Check that confirmation question is as expected.

@test

File

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

Class

ConfigEntityRevisionsRevertFormBaseTest

Namespace

Drupal\Tests\config_entity_revisions\Unit

Code

public function questionContainsActionAndRevisionDate() {
  $this->instance = $this
    ->getMockInstance(300);
  $actual = $this->instance
    ->getQuestion();
  $this
    ->assertEquals("Are you sure you want to %action to the revision from %revision-date?", $actual
    ->getUntranslatedString());
  $args = $actual
    ->getArguments();
  $this
    ->assertEquals([
    '%revision-date' => 1200,
    '%action' => 'revert',
  ], $args);
}