You are here

public function ConfigEntityRevisionsRevertFormBaseTest::updateConfigEntityModifiesEntityCorrectly in Config Entity Revisions 8

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

updateConfigEntity should update the config entity as expected.

@test

File

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

Class

ConfigEntityRevisionsRevertFormBaseTest
Test ability to revert (form) configurations.

Namespace

Drupal\Tests\config_entity_revisions\Unit

Code

public function updateConfigEntityModifiesEntityCorrectly() {
  $this->instance = $this
    ->getMockInstance(300, 'ConfigEntityRevisionsRevertFormTest2');
  $this->instance
    ->updateConfigEntity();
  $this
    ->assertTrue($this->serializer->wasCalled);
  $this
    ->assertEquals([
    'settingsOriginal' => 'originalSettings',
    'revision_id' => 300,
  ], $this->serializer->keyValuePairs);
}