MigrateForumConfigsTest.php in Drupal 10
File
core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php
View source
<?php
namespace Drupal\Tests\forum\Kernel\Migrate\d6;
use Drupal\Tests\SchemaCheckTestTrait;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
class MigrateForumConfigsTest extends MigrateDrupal6TestBase {
use SchemaCheckTestTrait;
protected static $modules = [
'comment',
'forum',
'taxonomy',
];
protected function setUp() : void {
parent::setUp();
$this
->executeMigration('d6_taxonomy_vocabulary');
$this
->executeMigration('d6_forum_settings');
}
public function testForumSettings() {
$config = $this
->config('forum.settings');
$this
->assertSame(15, $config
->get('topics.hot_threshold'));
$this
->assertSame(25, $config
->get('topics.page_limit'));
$this
->assertSame(1, $config
->get('topics.order'));
$this
->assertSame('forums', $config
->get('vocabulary'));
$this
->assertSame(3, $config
->get('block.active.limit'));
$this
->assertSame(4, $config
->get('block.new.limit'));
$this
->assertConfigSchema(\Drupal::service('config.typed'), 'forum.settings', $config
->get());
}
}