function UpdatePathTest::testAddLangcodeToSettings

Tests that updating adds a langcode to the dblog.settings config.

File

core/modules/dblog/tests/src/Functional/UpdatePathTest.php, line 30

Class

UpdatePathTest
Tests update functions for the Database Logging module.

Namespace

Drupal\Tests\dblog\Functional

Code

public function testAddLangcodeToSettings() : void {
    $this->assertEmpty($this->config('dblog.settings')
        ->get('langcode'));
    $this->runUpdates();
    $default_langcode = $this->container
        ->get('language_manager')
        ->getDefaultLanguage()
        ->getId();
    $this->assertSame($default_langcode, $this->config('dblog.settings')
        ->get('langcode'));
}

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