You are here

public function MigrateSearchSettingsTest::testSearchSettings in Zircon Profile 8.0

Same name in this branch
  1. 8.0 core/modules/search/src/Tests/Migrate/d6/MigrateSearchSettingsTest.php \Drupal\search\Tests\Migrate\d6\MigrateSearchSettingsTest::testSearchSettings()
  2. 8.0 core/modules/search/src/Tests/Migrate/d7/MigrateSearchSettingsTest.php \Drupal\search\Tests\Migrate\d7\MigrateSearchSettingsTest::testSearchSettings()
Same name and namespace in other branches
  1. 8 core/modules/search/src/Tests/Migrate/d7/MigrateSearchSettingsTest.php \Drupal\search\Tests\Migrate\d7\MigrateSearchSettingsTest::testSearchSettings()

Tests the migration of Search's variables to configuration.

File

core/modules/search/src/Tests/Migrate/d7/MigrateSearchSettingsTest.php, line 32
Contains \Drupal\search\Tests\Migrate\d7\MigrateSearchSettingsTest.

Class

MigrateSearchSettingsTest
Tests migration of Search variables to configuration.

Namespace

Drupal\search\Tests\Migrate\d7

Code

public function testSearchSettings() {
  $config = $this
    ->config('search.settings');
  $this
    ->assertIdentical('node_search', $config
    ->get('default_page'));
  $this
    ->assertIdentical(4, $config
    ->get('index.minimum_word_size'));
  $this
    ->assertTrue($config
    ->get('index.overlap_cjk'));
  $this
    ->assertIdentical(100, $config
    ->get('index.cron_limit'));
  $this
    ->assertIdentical(7, $config
    ->get('and_or_limit'));
  $this
    ->assertIdentical(25, $config
    ->get('index.tag_weights.h1'));
  $this
    ->assertIdentical(18, $config
    ->get('index.tag_weights.h2'));
  $this
    ->assertIdentical(15, $config
    ->get('index.tag_weights.h3'));
  $this
    ->assertIdentical(12, $config
    ->get('index.tag_weights.h4'));
  $this
    ->assertIdentical(9, $config
    ->get('index.tag_weights.h5'));
  $this
    ->assertIdentical(6, $config
    ->get('index.tag_weights.h6'));
  $this
    ->assertIdentical(3, $config
    ->get('index.tag_weights.u'));
  $this
    ->assertIdentical(3, $config
    ->get('index.tag_weights.b'));
  $this
    ->assertIdentical(3, $config
    ->get('index.tag_weights.i'));
  $this
    ->assertIdentical(3, $config
    ->get('index.tag_weights.strong'));
  $this
    ->assertIdentical(3, $config
    ->get('index.tag_weights.em'));
  $this
    ->assertIdentical(10, $config
    ->get('index.tag_weights.a'));
  $this
    ->assertTrue($config
    ->get('logging'));
}