MigrateUpdateConfigsTest.php in Drupal 10
File
core/modules/update/tests/src/Kernel/Migrate/d6/MigrateUpdateConfigsTest.php
View source
<?php
namespace Drupal\Tests\update\Kernel\Migrate\d6;
use Drupal\Tests\SchemaCheckTestTrait;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
class MigrateUpdateConfigsTest extends MigrateDrupal6TestBase {
use SchemaCheckTestTrait;
protected static $modules = [
'update',
];
protected function setUp() : void {
parent::setUp();
$this
->executeMigration('update_settings');
}
public function testUpdateSettings() {
$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());
}
}