function MigrateUpdateConfigsTest::testUpdateSettings

Same name and namespace in other branches
  1. 9 core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php \Drupal\Tests\update\Kernel\Migrate\d6\MigrateUpdateConfigsTest::testUpdateSettings()
  2. 8.9.x core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php \Drupal\Tests\update\Kernel\Migrate\d6\MigrateUpdateConfigsTest::testUpdateSettings()
  3. 10 core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php \Drupal\Tests\update\Kernel\Migrate\d6\MigrateUpdateConfigsTest::testUpdateSettings()

Tests migration of update variables to update.settings.yml.

File

core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php, line 35

Class

MigrateUpdateConfigsTest
Upgrade variables to <a href="/api/drupal/core%21modules%21update%21config%21install%21update.settings.yml/11.x" title="core/modules/update/config/install/update.settings.yml" class="local">update.settings.yml</a>.

Namespace

Drupal\Tests\update\Kernel\Migrate\d6

Code

public function testUpdateSettings() : void {
    $config = $this->config('update.settings');
    $this->assertSame(2, $config->get('fetch.max_attempts'));
    $this->assertSame('https://updates.drupal.org/release-history', $config->get('fetch.url'));
    $this->assertSame('all', $config->get('notification.threshold'));
    $this->assertSame([], $config->get('notification.emails'));
    $this->assertSame(7, $config->get('check.interval_days'));
    $this->assertConfigSchema(\Drupal::service('config.typed'), 'update.settings', $config->get());
}

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