You are here

public function SerializationSettingsDeletionUpdateTest::testUpdate in Drupal 9

Ensures that update hook is run for "serialization" module.

File

core/modules/serialization/tests/src/Functional/Update/SerializationSettingsDeletionUpdateTest.php, line 26

Class

SerializationSettingsDeletionUpdateTest
Ensures that update hook is run properly for deleting obsolete serialization settings.

Namespace

Drupal\Tests\serialization\Functional\Update

Code

public function testUpdate() {
  $serialization_settings = $this
    ->config('serialization.settings');
  $this
    ->assertFalse($serialization_settings
    ->isNew());
  $this
    ->assertEquals(FALSE, $serialization_settings
    ->get('bc_primitives_as_strings'));
  $this
    ->assertEquals(TRUE, $serialization_settings
    ->get('bc_timestamp_normalizer_unix'));
  $this
    ->runUpdates();
  $serialization_settings = \Drupal::configFactory()
    ->get('serialization.settings');
  $this
    ->assertTrue($serialization_settings
    ->isNew());
}