MigrateBookConfigsTest.php in Drupal 10
File
core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookConfigsTest.php
View source
<?php
namespace Drupal\Tests\book\Kernel\Migrate\d7;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
use Drupal\Tests\SchemaCheckTestTrait;
class MigrateBookConfigsTest extends MigrateDrupal7TestBase {
use SchemaCheckTestTrait;
protected static $modules = [
'book',
'node',
];
protected function setUp() : void {
parent::setUp();
$this
->executeMigration('book_settings');
}
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());
}
}