Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / syslog / tests / src / Functional / Update / SyslogUpdateTest.php
diff --git a/web/core/modules/syslog/tests/src/Functional/Update/SyslogUpdateTest.php b/web/core/modules/syslog/tests/src/Functional/Update/SyslogUpdateTest.php
new file mode 100644 (file)
index 0000000..e5dfed6
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\Tests\syslog\Functional\Update;
+
+use Drupal\FunctionalTests\Update\UpdatePathTestBase;
+
+/**
+ * Tests that syslog settings are properly updated during database updates.
+ *
+ * @group syslog
+ */
+class SyslogUpdateTest extends UpdatePathTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setDatabaseDumpFiles() {
+    $this->databaseDumpFiles = [
+      __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.filled.standard.php.gz',
+    ];
+  }
+
+  /**
+   * Tests that syslog.settings.facility has been converted from string to int.
+   *
+   * @see syslog_update_8400()
+   */
+  public function testSyslogSettingsFacilityDataType() {
+    $config = $this->config('syslog.settings');
+    $this->assertIdentical('128', $config->get('facility'));
+
+    // Run updates.
+    $this->runUpdates();
+
+    $config = $this->config('syslog.settings');
+    $this->assertIdentical(128, $config->get('facility'));
+  }
+
+}