You are here

public function MigrateForumConfigsTest::testForumSettings in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/forum/src/Tests/Migrate/d6/MigrateForumConfigsTest.php \Drupal\forum\Tests\Migrate\d6\MigrateForumConfigsTest::testForumSettings()

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

File

core/modules/forum/src/Tests/Migrate/d6/MigrateForumConfigsTest.php, line 39
Contains \Drupal\forum\Tests\Migrate\d6\MigrateForumConfigsTest.

Class

MigrateForumConfigsTest
Upgrade variables to forum.settings.yml.

Namespace

Drupal\forum\Tests\Migrate\d6

Code

public function testForumSettings() {
  $config = $this
    ->config('forum.settings');
  $this
    ->assertIdentical(15, $config
    ->get('topics.hot_threshold'));
  $this
    ->assertIdentical(25, $config
    ->get('topics.page_limit'));
  $this
    ->assertIdentical(1, $config
    ->get('topics.order'));
  $this
    ->assertIdentical('vocabulary_1_i_0_', $config
    ->get('vocabulary'));

  // This is 'forum_block_num_0' in D6, but block:active:limit' in D8.
  $this
    ->assertIdentical(5, $config
    ->get('block.active.limit'));

  // This is 'forum_block_num_1' in D6, but 'block:new:limit' in D8.
  $this
    ->assertIdentical(5, $config
    ->get('block.new.limit'));
  $this
    ->assertConfigSchema(\Drupal::service('config.typed'), 'forum.settings', $config
    ->get());
}