MigrateDblogConfigsTest.php

Same filename in this branch
  1. main core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
Same filename and directory in other branches
  1. 10 core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
  2. 10 core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
  3. 11.x core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
  4. 11.x core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
  5. 9 core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
  6. 9 core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php
  7. 8.9.x core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php
  8. 8.9.x core/modules/dblog/tests/src/Kernel/Migrate/d7/MigrateDblogConfigsTest.php

Namespace

Drupal\Tests\dblog\Kernel\Migrate\d6

File

core/modules/dblog/tests/src/Kernel/Migrate/d6/MigrateDblogConfigsTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\dblog\Kernel\Migrate\d6;

use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
use Drupal\Tests\SchemaCheckTestTrait;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
 * Upgrade variables to dblog.settings.yml.
 */
class MigrateDblogConfigsTest extends MigrateDrupal6TestBase {
  use SchemaCheckTestTrait;
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'dblog',
  ];
  
  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    parent::setUp();
    // Enable dblog in the source database so that requirements are met.
    $this->sourceDatabase
      ->update('system')
      ->condition('name', 'dblog')
      ->fields([
      'status' => '1',
    ])
      ->execute();
    $this->executeMigration('d6_dblog_settings');
  }
  
  /**
   * Tests migration of dblog variables to dblog.settings.yml.
   */
  public function testDblogSettings() : void {
    $config = $this->config('dblog.settings');
    $this->assertSame(10000, $config->get('row_limit'));
    $this->assertConfigSchema(\Drupal::service('config.typed'), 'dblog.settings', $config->get());
  }

}

Classes

Title Deprecated Summary
MigrateDblogConfigsTest Upgrade variables to dblog.settings.yml.

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