function MigrateForumConfigsTest::testForumSettings

Same name in other branches
  1. 8.9.x core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php \Drupal\Tests\forum\Kernel\Migrate\d6\MigrateForumConfigsTest::testForumSettings()
  2. 10 core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php \Drupal\Tests\forum\Kernel\Migrate\d6\MigrateForumConfigsTest::testForumSettings()
  3. 11.x core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php \Drupal\Tests\forum\Kernel\Migrate\d6\MigrateForumConfigsTest::testForumSettings()

Tests migration of forum variables to forum.settings.yml.

File

core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumConfigsTest.php, line 34

Class

MigrateForumConfigsTest
Upgrade variables to forum.settings.yml.

Namespace

Drupal\Tests\forum\Kernel\Migrate\d6

Code

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 is 'forum_block_num_0' in D6, but block:active:limit' in D8.
    $this->assertSame(3, $config->get('block.active.limit'));
    // This is 'forum_block_num_1' in D6, but 'block:new:limit' in D8.
    $this->assertSame(4, $config->get('block.new.limit'));
    $this->assertConfigSchema(\Drupal::service('config.typed'), 'forum.settings', $config->get());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.