3 namespace Drupal\Tests\book\Kernel\Migrate\d6;
5 use Drupal\Tests\SchemaCheckTestTrait;
6 use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
9 * Upgrade variables to book.settings.yml.
11 * @group migrate_drupal_6
13 class MigrateBookConfigsTest extends MigrateDrupal6TestBase {
15 use SchemaCheckTestTrait;
20 public static $modules = ['book'];
23 * Data provider for testBookSettings().
26 * The data for each test scenario.
28 public function providerBookSettings() {
30 // d6_book_settings was renamed to book_settings, but use the old alias to
31 // prove that it works.
32 // @see book_migration_plugins_alter()
39 * Tests migration of book variables to book.settings.yml.
41 * @dataProvider providerBookSettings
43 public function testBookSettings($migration_id) {
44 $this->executeMigration($migration_id);
46 $config = $this->config('book.settings');
47 $this->assertIdentical('book', $config->get('child_type'));
48 $this->assertSame('book pages', $config->get('block.navigation.mode'));
49 $this->assertIdentical(['book'], $config->get('allowed_types'));
50 $this->assertConfigSchema(\Drupal::service('config.typed'), 'book.settings', $config->get());