class MigrateSyslogConfigsTest

Same name in this branch
  1. 9 core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php \Drupal\Tests\syslog\Kernel\Migrate\d7\MigrateSyslogConfigsTest
Same name and namespace in other branches
  1. 11.x core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php \Drupal\Tests\syslog\Kernel\Migrate\d6\MigrateSyslogConfigsTest
  2. 11.x core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php \Drupal\Tests\syslog\Kernel\Migrate\d7\MigrateSyslogConfigsTest

Upgrade variables to syslog.settings.yml.

@group migrate_drupal_6

Hierarchy

Expanded class hierarchy of MigrateSyslogConfigsTest

File

core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php, line 13

Namespace

Drupal\Tests\syslog\Kernel\Migrate\d6
View source
class MigrateSyslogConfigsTest extends MigrateDrupal6TestBase {
  use SchemaCheckTestTrait;
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'syslog',
  ];
  
  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    parent::setUp();
    // Enable syslog in the source database so that requirements are met.
    $this->sourceDatabase
      ->update('system')
      ->condition('name', 'syslog')
      ->fields([
      'status' => '1',
    ])
      ->execute();
    $this->executeMigration('d6_syslog_settings');
  }
  
  /**
   * Tests migration of syslog variables to syslog.settings.yml.
   */
  public function testSyslogSettings() {
    $config = $this->config('syslog.settings');
    $this->assertSame('drupal', $config->get('identity'));
    $this->assertSame(128, $config->get('facility'));
    $this->assertConfigSchema(\Drupal::service('config.typed'), 'syslog.settings', $config->get());
  }

}

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