SerializationSettingsDeletionUpdateTest.php
Namespace
Drupal\Tests\serialization\Functional\UpdateFile
-
core/
modules/ serialization/ tests/ src/ Functional/ Update/ SerializationSettingsDeletionUpdateTest.php
View source
<?php
namespace Drupal\Tests\serialization\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
/**
* Ensures that update hook is run properly for deleting obsolete serialization settings.
*
* @group serialization
*/
class SerializationSettingsDeletionUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.8.0.filled.standard.php.gz',
];
}
/**
* Ensures that update hook is run for "serialization" module.
*/
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());
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
SerializationSettingsDeletionUpdateTest | Ensures that update hook is run properly for deleting obsolete serialization settings. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.