function SerializationSettingsDeletionUpdateTest::testUpdate

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());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.