ef5d8c305dd205cd1317f4212128e9206119feea
[yaffs-website] / web / core / modules / syslog / tests / src / Kernel / Migrate / d7 / MigrateSyslogConfigsTest.php
1 <?php
2
3 namespace Drupal\Tests\syslog\Kernel\Migrate\d7;
4
5 use Drupal\Tests\SchemaCheckTestTrait;
6 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
7
8 /**
9  * Upgrade variables to syslog.settings.yml.
10  *
11  * @group syslog
12  */
13 class MigrateSyslogConfigsTest extends MigrateDrupal7TestBase {
14
15   use SchemaCheckTestTrait;
16
17   /**
18    * Modules to enable.
19    *
20    * @var array
21    */
22   public static $modules = ['syslog'];
23
24   /**
25    * {@inheritdoc}
26    */
27   protected function setUp() {
28     parent::setUp();
29     $this->installConfig(static::$modules);
30     $this->executeMigration('d7_syslog_settings');
31   }
32
33   /**
34    * Tests migration of syslog variables to syslog.settings.yml.
35    */
36   public function testSyslogSettings() {
37     $config = $this->config('syslog.settings');
38     // 8 == LOG_USER
39     $this->assertIdentical(8, $config->get('facility'));
40     $this->assertIdentical('!base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message', $config->get('format'));
41     $this->assertIdentical('drupal', $config->get('identity'));
42   }
43
44 }