function InstallerExistingConfigMultilingualTest::testConfigSync

Same name in other branches
  1. 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigMultilingualTest::testConfigSync()

Overrides InstallerExistingConfigTestBase::testConfigSync

File

core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php, line 31

Class

InstallerExistingConfigMultilingualTest
Verifies that installing from existing configuration works.

Namespace

Drupal\FunctionalTests\Installer

Code

public function testConfigSync() : void {
    parent::testConfigSync();
    // Ensure no warning, error, critical, alert or emergency messages have been
    // logged.
    $count = (int) \Drupal::database()->select('watchdog', 'w')
        ->fields('w')
        ->condition('severity', RfcLogLevel::WARNING, '<=')
        ->countQuery()
        ->execute()
        ->fetchField();
    $this->assertSame(0, $count);
    // Ensure the correct message is logged from locale_config_batch_finished().
    $count = (int) \Drupal::database()->select('watchdog', 'w')
        ->fields('w')
        ->condition('message', 'The configuration was successfully updated. %number configuration objects updated.')
        ->countQuery()
        ->execute()
        ->fetchField();
    $this->assertSame(1, $count);
}

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