MigrateBookConfigsTest.php in Drupal 10
File
core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php
View source
<?php
namespace Drupal\Tests\book\Kernel\Migrate\d6;
use Drupal\Tests\SchemaCheckTestTrait;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
class MigrateBookConfigsTest extends MigrateDrupal6TestBase {
use SchemaCheckTestTrait;
protected static $modules = [
'book',
];
public function providerBookSettings() {
return [
[
'd6_book_settings',
],
[
'book_settings',
],
];
}
public function testBookSettings($migration_id) {
$this
->executeMigration($migration_id);
$config = $this
->config('book.settings');
$this
->assertSame('book', $config
->get('child_type'));
$this
->assertSame('book pages', $config
->get('block.navigation.mode'));
$this
->assertSame([
'book',
], $config
->get('allowed_types'));
$this
->assertConfigSchema(\Drupal::service('config.typed'), 'book.settings', $config
->get());
}
}