Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / book / tests / src / Kernel / Migrate / d7 / MigrateBookConfigsTest.php
diff --git a/web/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookConfigsTest.php b/web/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookConfigsTest.php
new file mode 100644 (file)
index 0000000..a5504c9
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+
+namespace Drupal\Tests\book\Kernel\Migrate\d7;
+
+use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
+use Drupal\Tests\SchemaCheckTestTrait;
+
+/**
+ * Tests the migration of Book settings.
+ *
+ * @group migrate_drupal_7
+ */
+class MigrateBookConfigsTest extends MigrateDrupal7TestBase {
+
+  use SchemaCheckTestTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['book', 'node'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->executeMigration('book_settings');
+  }
+
+  /**
+   * Tests migration of book variables to book.settings.yml.
+   */
+  public function testBookSettings() {
+    $config = $this->config('book.settings');
+    $this->assertSame('book', $config->get('child_type'));
+    $this->assertSame('all pages', $config->get('block.navigation.mode'));
+    $this->assertSame(['book'], $config->get('allowed_types'));
+    $this->assertConfigSchema(\Drupal::service('config.typed'), 'book.settings', $config->get());
+  }
+
+}