InstallerExistingConfigMultilingualTest.php

Same filename in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php
  2. 8.9.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php
  3. 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php

Namespace

Drupal\FunctionalTests\Installer

File

core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\FunctionalTests\Installer;

use Drupal\Core\Logger\RfcLogLevel;

/**
 * Verifies that installing from existing configuration works.
 *
 * @group Installer
 */
class InstallerExistingConfigMultilingualTest extends InstallerExistingConfigTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected $profile = 'testing_config_install_multilingual';
    
    /**
     * {@inheritdoc}
     */
    protected function getConfigTarball() {
        return __DIR__ . '/../../../fixtures/config_install/multilingual.tar.gz';
    }
    
    /**
     * {@inheritdoc}
     */
    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);
    }

}

Classes

Title Deprecated Summary
InstallerExistingConfigMultilingualTest Verifies that installing from existing configuration works.

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