function MigrateSearchSettingsTest::testSearchSettings

Same name in this branch
  1. 11.x core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php \Drupal\Tests\search\Kernel\Migrate\d6\MigrateSearchSettingsTest::testSearchSettings()
Same name in other branches
  1. 9 core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php \Drupal\Tests\search\Kernel\Migrate\d6\MigrateSearchSettingsTest::testSearchSettings()
  2. 9 core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php \Drupal\Tests\search\Kernel\Migrate\d7\MigrateSearchSettingsTest::testSearchSettings()
  3. 8.9.x core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php \Drupal\Tests\search\Kernel\Migrate\d6\MigrateSearchSettingsTest::testSearchSettings()
  4. 8.9.x core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php \Drupal\Tests\search\Kernel\Migrate\d7\MigrateSearchSettingsTest::testSearchSettings()
  5. 10 core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchSettingsTest.php \Drupal\Tests\search\Kernel\Migrate\d6\MigrateSearchSettingsTest::testSearchSettings()
  6. 10 core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php \Drupal\Tests\search\Kernel\Migrate\d7\MigrateSearchSettingsTest::testSearchSettings()

Tests the migration of Search's variables to configuration.

File

core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchSettingsTest.php, line 32

Class

MigrateSearchSettingsTest
Tests migration of Search variables to configuration.

Namespace

Drupal\Tests\search\Kernel\Migrate\d7

Code

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

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